What's this? (Was: DMD 1.028 and 2.012 releases)
Aarti_pl
aarti at interia.pl
Fri Mar 7 01:25:58 PST 2008
Did you notice this example in docs?
(http://www.digitalmars.com/d/2.0/struct.html#AssignOverload)
S* opAssign(S s)
{ S tmp <== *this; // bitcopy *this into tmp
*this <== s; // bitcopy s into *this
tmp.~this(); // call destructor on tmp
return this;
}
It seems to be something new in D 2.012. Does it work? How?
BR
Marcin Kuszczak
(aarti_pl)
More information about the Digitalmars-d-announce
mailing list