opAssign and const?
Steven Schveighoffer
schveiguy at yahoo.com
Fri May 4 14:29:11 PDT 2012
On Fri, 04 May 2012 17:26:02 -0400, Era Scarecrow <rtcvb32 at yahoo.com>
wrote:
> On Friday, 4 May 2012 at 21:12:55 UTC, Steven Schveighoffer wrote:
>> y[] = x2.y[];
>> // as you did below
>
> That may deal with the language requirements, but the ideal was to
> take over the temporary; If not the ref would copy the contents. I
> wonder if I will need to have 2 copies of each opAssign to satisfy
> everything.
OK, I see what you are trying to do. I'll have to think about it some
more. I'm very concerned that you could potentially end up calling this
function with an lvalue, which would make this a disasterous strategy.
-Steve
More information about the Digitalmars-d-learn
mailing list