Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2005-02-17 13:54:55

"David Abrahams" <dave_at_[hidden]> escribió en el mensaje
> "Fernando Cacciola" <fernando_cacciola_at_[hidden]> writes:
>> Or to put it another way, if a class is so broken as to support a
>> reasonable
>> copy-constructor (which is a current requirement), but not assignment,
>> then
>> I'm probably doing him/her a favor by breaking it :-)
> ?? Any immutable or const type should fit that description.
A const type is not a class. A class by itself would support proper
assignment even if you can't use it on a const lvalue.

IOW, if you have a proper copy ctor you must have a proper assignment
operator. Inmutability given by type qualification is something else...

Or are you referring to classes which do implement operator=() but
purposedly to do something semantically different than to yield two
equivalent objects in the exact same way a copy-ctor will produce them?

Fernando Cacciola

Boost list run by bdawes at, gregod at, cpdaniel at, john at