[Issue 9238] Support rvalue references
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 23 12:03:22 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9238
--- Comment #14 from Andrei Alexandrescu <andrei at erdani.com> 2013-04-23 12:03:18 PDT ---
Adding an example that should work by Steve:
http://forum.dlang.org/thread/ylebrhjnrrcajnvtthtt@forum.dlang.org?page=11
struct S
{
int x;
ref S opOpAssign(string op : "+")(ref S other) { x += other.x; return
this;}
}
ref S add5(ref S s)
{
auto o = S(5);
return s += o;
}
void main()
{
auto s = S(5);
S s2 = add5(s);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list