defaulting leading template parameters?

Sean Kelly sean at
Wed Oct 25 15:59:09 PDT 2006

d-bugmail at wrote:
> void testfunc(DUMMY = void, T)(int x, T a) {
>     writefln("x = %d, a = %s", x, a);
> }

I had no idea this was legal--it isn't in C++.  I guess the rationale is 
that if the compiler can figure out the remaining parameters by 
inspecting function arguments then this is not an error?


More information about the Digitalmars-d-bugs mailing list