string failedAttempt(string className, Args...)(Args args)
return "foo!(" ~ className ~ ")(args);";
void foo(T, Args...)(Args args)
writefln("Called with type %s and args %s", T.stringof, args.length);
interface ICalendarFactory {}
enum expand(string className) = "{I" ~ className ~ "Factory a = null; return a;}";
template theType(string className)
static if (is(typeof(mixin(expand!className)()) T)) {
static assert(0, "I" ~ className ~ "Factory does not exist");
alias T = typeof(mixin(expand!"Calendar")());
writefln("Result of expand call is %s", T.stringof);
foo!(theType!"Calendar")(1, 2, 3);