[Issue 2372] Template parameter types given as template parameter inhibits template instantiation + missing line number
https://issues.dlang.org/show_bug.cgi?id=2372 Simen Kjaeraaschanged: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Simen Kjaeraas --- Jonathan Marler's code does indeed exhibit the same issue, and gives a small demonstration of why this will never work in the general case. For a more explicit demonstration: void foo(T)(Bar!T value) {} template Bar(T) { alias Bar = string; } foo("test"); // What is T? Clearly, in this case T cannot be determined. Real life examples could be significantly more complex, and even involve CTFE and string mixins. There's simply no way to make this work in the language. --
[Issue 2372] Template parameter types given as template parameter inhibits template instantiation + missing line number
https://issues.dlang.org/show_bug.cgi?id=2372 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|D1 D2 |D2 --
[Issue 2372] Template parameter types given as template parameter inhibits template instantiation + missing line number
https://issues.dlang.org/show_bug.cgi?id=2372 Jonathan Marler johnnymar...@gmail.com changed: What|Removed |Added CC||johnnymar...@gmail.com --- Comment #3 from Jonathan Marler johnnymar...@gmail.com --- Can you confirm this code has basically the same issue or should a new bug be filed for it? -- import std.stdio; template Transform(T) { alias Transform = T; } void testTransform(T)(Transform!T t) { } void testNoTransform(T)(T t) { } void main(string[] args) { testTransform(3); // FAILS cannot deduce function... testTransform!int(3); testNoTransform(3); testNoTransform!int(3); } -- The test(3) line fails with this error message: main.d(15): Error: template main.testTransform cannot deduce function from argument types !()(int), candidates are: main.d(7):main.testTransform(T)(Transform!T t) --
[Issue 2372] Template parameter types given as template parameter inhibits template instantiation + missing line number
https://issues.dlang.org/show_bug.cgi?id=2372 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #2 from hst...@quickfur.ath.cx --- Still happens in git HEAD. --
[Issue 2372] Template parameter types given as template parameter inhibits template instantiation
http://d.puremagic.com/issues/show_bug.cgi?id=2372 --- Comment #1 from Simen Kjaeraas simen.kja...@gmail.com 2010-06-17 10:44:15 PDT --- *** Issue 2239 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---