Joseph Rushton Wakeling:
... or have I missed something?
Second try: import std.stdio; void printSize2(T)(T x) { writeln(T.stringof); } void printSize(T1 = void, T2 = real)(T2 x) { static if (is(T1 == void)) printSize2!real(x); else printSize2!T1(x); } void main() { float x; x.printSize(); // shoud be real x.printSize!float(); // shoud be float x.printSize!real(); // shoud be real } Bye, bearophile