With both version = ng and ok, the code should be compiled successfully. version (ng) { void foo(R1, R2)(R1 r1, R2 r2) {} template foo(alias pred) { void foo(R1, R2)(R1 r1, R2 r2) {} } } version (ok) { template foo(alias pred) { void foo(R1, R2)(R1 r1, R2 r2) {} } void foo(R1, R2)(R1 r1, R2 r2) {} } void main() { foo(1, 2); foo!(a => a)(1, 2); }
https://github.com/D-Programming-Language/dmd/pull/2472 https://github.com/D-Programming-Language/phobos/pull/1473
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/bf9676b0cf75c2e16c2f485e06eefd3fd0ee234b Remove conflict template function By fixing bug 10811, both toUTFz template functions will conflict on the call `toUTFz!(T)(str)`. Remove one to resolve ambiguity. https://github.com/D-Programming-Language/phobos/commit/82085781b0b18b4a799f0727e80aadb41b3369d5 Merge pull request #1473 from 9rnsr/fix10811 Supplemental fix for issue 10811 - Remove conflict template function
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0cefbdccbc755415fb31966b17973c51fc707610 fix Issue 10811 - Order dependent IFTI failure https://github.com/D-Programming-Language/dmd/commit/a5c9b9ae4c25aea71153f162ed7026f561061e28 Merge pull request #2472 from 9rnsr/fix10811 Issue 10811 - Order dependent IFTI failure