[RFA] Removing const from std::swap

Joe Buck Joe.Buck@synopsys.COM
Thu May 19 19:48:00 GMT 2005

On Thu, May 19, 2005 at 10:28:16PM +0200, Gabriel Dos Reis wrote:
> Joe Buck <Joe.Buck@synopsys.COM> writes:
> | Certainly Assignable is needed if the three-assignment implementation (or
> | copy ctor + two assignment) is to work ( T t(a); a = b; b = t).
> I think the point was that Assignable was too strong and too fuzzy
> assumption for the three-assignment implementation to work.
> Can the implementation use const?  If yes, must it?  I think that is a
> recipe for non-portability.

Right; a class with only Foo& operator=(Foo&) is not Assignable.  So I
guess there needs to be a more general concept.

More information about the Libstdc++ mailing list