Bug 13694 – Typesafe variadic function template overload fails to match to any template

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-07T03:52:00Z
Last change time
2015-02-18T03:39:40Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
alanb

Comments

Comment #0 by alanb — 2014-11-07T03:52:41Z
Below minimal code used to work with DMD 2.064.2 amd64 fails with DMD 2.066.1 amd64 struct S{} void foo(T)( string A, long E, T[] G ... ) {} void foo(T)( string A, T[] G ... ) {} int main() { S v; foo("A", v); // <- OK foo("A", 0, v); // <- used to be OK but now fails foo!(S)("A", 0, v); // <- workaround solution return 0; } $ dmd main.d main.d(13): Error: template main.foo cannot deduce function from argument types !()(string, int, S), candidates are: main.d(3): main.foo(T)(string A, long E, T[] G...) main.d(6): main.foo(T)(string A, T[] G...)
Comment #1 by k.hara.pg — 2014-11-16T04:47:50Z
Comment #2 by github-bugzilla — 2014-11-17T03:37:51Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/21a1b997fd5818d463036bab7fb1f6e41f03830a fix Issue 13694 - Typesafe variadic function template overload fails to match to any template https://github.com/D-Programming-Language/dmd/commit/8a8b49e36d705722d25fd6555e3ca40ff740a3ed Merge pull request #4145 from 9rnsr/fix13694 [REG2.067a] Issue 13694 - Typesafe variadic function template overload fails to match to any template
Comment #3 by k.hara.pg — 2014-12-04T14:48:59Z
*** Issue 13811 has been marked as a duplicate of this issue. ***
Comment #4 by github-bugzilla — 2015-02-18T03:39:40Z
Commits pushed to 2.067 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/21a1b997fd5818d463036bab7fb1f6e41f03830a fix Issue 13694 - Typesafe variadic function template overload fails to match to any template https://github.com/D-Programming-Language/dmd/commit/8a8b49e36d705722d25fd6555e3ca40ff740a3ed Merge pull request #4145 from 9rnsr/fix13694