Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-08-07 07:22:42


Alisdair Meredith wrote:
>
> I am still not clear on the 'best' solution though.
> Clearly the quickest fix is to simply put the swap specialization in
> the correct namespace.
>
> However, boost code does not seem to specialize std::swap at all, but
> rather provide its own swaps in namespace boost. Is this the
> preferred approach? [using my own namespaces, obviously!]

http://std.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#226

Summary: at present, the "best practice" is swap() overload in the class
namespace and

using std::swap;
swap(x, y);

at point of use.


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