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.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to