void foo(T)(T t){writeln("a");} void foo(T...)(T t){writeln("b");}
foo(1); Compiles? If so, which prints out?I was surprised by the answer. I can't find docs for it. Is the behavior intended?
-Steve
Steven Schveighoffer via Digitalmars-d-learn Thu, 24 Nov 2016 09:52:12 -0800
void foo(T)(T t){writeln("a");} void foo(T...)(T t){writeln("b");}
foo(1); Compiles? If so, which prints out?I was surprised by the answer. I can't find docs for it. Is the behavior intended?
-Steve