Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-07-29 19:24:23


on Tue Jul 29 2008, Steven Watanabe <watanabesj-AT-gmail.com> wrote:

> AMDG
>
> David Abrahams wrote:
>> Seems to me that if this is failing on so many compilers, our only
>> practical alternative is to call boost::swap something other than swap.
>> How about swap_()?
>>
>
> I have a fix: Make sure that std::swap is more specialized than
> boost::swap.

Ingenious; that should work.

> In Christ,
> Steven Watanabe
>
> Index: swap.hpp
> ===================================================================
> --- swap.hpp (revision 47858)
> +++ swap.hpp (working copy)
> @@ -38,8 +38,8 @@
> {
> namespace swap_adl_barrier
> {
> - template<class T>
> - void swap(T& left, T& right)
> + template<class T1, class T2>
> + void swap(T1& left, T2& right)
> {
> ::boost_swap_impl::swap_impl(left, right);
> }
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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