Boost logo

Boost :

Subject: Re: [boost] [move] Reason for BOOST_COPY_ASSIGN_REF?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-04-21 07:22:46


Chad Nelson wrote:
>
> - - How is the "copy assignment operator" different from the normal
> operator=(const T&)?

The "normal operator=(const T&)" *is* the copy assignment operator. That's always been the name of that member function. There can be any number of assignment operators, providing interoperability with other types, but there's only one that is expected to assign from another instance of the same class to make *this a copy of the source.

With C++0x, there is also a _move assignment operator_, which uses an rvalue reference.

Precision in terminology, especially as the variations increase, is helpful.

HTH,

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk