This is my program:
// This works with and without 'mixin' attribute. mixin template funcgen(T, U){ T func1(string pr2){ writeln("Func1: ", pr2); } U func2(string pr3){ writeln("Func2: ", pr3); } } int main(string[] args){ mixin funcgen!(void, void); func1("func1"); func2("func2"); return 0; }