[RFA] Removing const from std::swap

Gabriel Dos Reis gdr@integrable-solutions.net
Thu May 19 16:59:00 GMT 2005

Paolo Carlini <pcarlini@suse.de> writes:

| Gabriel Dos Reis wrote:
| >I'll look at it differently: Does the const buy us anything?  If not,
| >it should be removed.
| >  
| >
| Right, already tested patch below.
| >| If we keep it, auto_ptrs cannot be swapped, as an extension,
| >| indeed...
| >
| >I do not follow here.
| >  
| >
| Well, the thread started with a message about a failed attempt to swap
| auto_ptrs, which are not Assignable, right? Or I'm misunderstanding your
| doubt?

No, you do not -- I just need to do a proper context switch :-)

I guess, the question is whether the proper assumption (concept) for
swap() is Assignbale.  I think no (even though the standard says yes.
Now, I see what you mean.) 

-- Gaby

More information about the Libstdc++ mailing list