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
That is expected. The general rule is go for the narrowest match. Since a matches a smaller set then b. a is selected.