http://d.puremagic.com/issues/show_bug.cgi?id=10183
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #2 from Kenji Hara <[email protected]> 2013-05-27 04:58:31 PDT --- (In reply to comment #0) > Code: > ---- > struct A(T, Unused) > { > T t; > } > > template B(T) > { > alias B = A!(T, void); > } > > void foo(T)(A!T a) {} The pattern A!T means that the template A has _exactly_ one type template argument. > void main() > { > auto b = B!int(42); // OK, works > > foo(b); // NG - causes error But the type of b is A!(int, void), so it does not match to A!T during IFTI. > } In this case, template function foo should have following signature. void foo(TL...)(A!TL a) {} // TL would be deduced to (int, void) or void foo(T, TL...)(A!(T, TL) a) {} // T would be deduced to int // TL would be deduced to (void) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
