https://issues.dlang.org/show_bug.cgi?id=14791
Walter Bright <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|phobos |dmd --- Comment #2 from Walter Bright <[email protected]> --- Test case: import std.range; void indexOf(Range)(Range s, bool cs = true) if (isInputRange!Range) { } void indexOf(T, size_t n)(ref T[n] s, bool cs = true) { } void test() { char[64] buf; indexOf(buf[]); } Results: Error: template foo.indexOf cannot deduce function from argument types !() (char[]), candidates are: foo.indexOf(Range)(Range s, bool cs = true) if (isInputRange!Range) foo.indexOf(T, uint n)(ref T[n] s, bool cs = true) Now, the peculiar thing is, if we remove the "bool cs = true" from both templates, it compiles without error. This is definitely a dmd bug, not a Phobos bug. --
