
"David Abrahams" <dave@boost-consulting.com> escribió en el mensaje news:umzu3t5yn.fsf@boost-consulting.com...
"Fernando Cacciola" <fernando_cacciola@hotmail.com> 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