[Issue 2460] Ref functions can't be template functions.
https://issues.dlang.org/show_bug.cgi?id=2460 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|2.020 |D2 --
[Issue 2460] Ref functions can't be template functions.
http://d.puremagic.com/issues/show_bug.cgi?id=2460 --- Comment #4 from Lars T. Kyllingstad bugzi...@kyllingen.net 2011-04-26 02:40:59 PDT --- Cool! I'll fix std.complex. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2460] Ref functions can't be template functions.
http://d.puremagic.com/issues/show_bug.cgi?id=2460 kenn...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||kenn...@gmail.com Resolution||FIXED --- Comment #3 from kenn...@gmail.com 2011-04-23 09:31:02 PDT --- Looks like this has been fixed. All programs in this page compiles for me. struct Foo { double x, y; ref double get(Args...)(Args args) if (args.length == 4) { return x; } } void main() { Foo f; f.get(4,5,6,7) = 6; assert(f.x == 6); } Can we fix this std.complex bug then? Some operators, such as opAssign and opOpAssign, should return by ref, but currently don't. This will be implemented as soon as DMD bug 2460 is fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2460] Ref functions can't be template functions.
http://d.puremagic.com/issues/show_bug.cgi?id=2460 Masahiro Nakagawa repeate...@gmail.com changed: What|Removed |Added CC||repeate...@gmail.com --- Comment #2 from Masahiro Nakagawa repeate...@gmail.com 2010-05-24 08:59:21 PDT --- Today, I hit the similar problem. In the latest dmd, above code works but variadic version doesn't works. struct Foo { // works! I use this for workaround template foo(Args...) if (true) { ref Foo foo(Args args) { return this; } } // doesn't work. I want use this!! ref Foo foo(Args...)(Args args) if (true) { return this; } // works! ref Foo foo(Args...)(Args args) { return this; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2460] Ref functions can't be template functions.
http://d.puremagic.com/issues/show_bug.cgi?id=2460 Lars T. Kyllingstad bugzi...@kyllingen.net changed: What|Removed |Added CC||bugzi...@kyllingen.net Severity|minor |major --- Comment #1 from Lars T. Kyllingstad bugzi...@kyllingen.net 2010-03-27 11:27:51 PDT --- Raising importance, since operator overloading is now done with templated functions, and this will become a major pain in the long run. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---