Boost logo

Boost :

Subject: Re: [boost] [Bug Sprint] [variant] #2839 ambiguous swap call
From: Daniel Hulme (st_at_[hidden])
Date: 2009-06-03 09:53:12


On Tue, Jun 02, 2009 at 01:45:36PM +0100, Daniel Hulme wrote:
> On Tue, Jun 02, 2009 at 11:10:46AM +0100, Joseph Gauterin wrote:
> > We solved a similar problem in Boost.Swap by providing a templated
> > swap with two template arguments [making it less specialized than
> > std::swap]. I've had a quick look at variant/detail/move.hpp and I
> > think it can be fixed in the same way.
>
> That's great. I will cook a patch to that effect and attach it to the
> ticket.

Actually, on second thoughts, I don't think I want to do that. I'm
pretty sure the intent of the code is to replace the generic
swap-by-copy-assignment std::swap template, but *not* to replace a
specifically-written swap. Making it *less* specialized than std::swap
is effectively the same as removing detail::move_swap::swap(), I think.
Is there a hack to exclude the std::swap template from consideration for
this call?

-- 
Unless obstructed through environmental noise or great distance, holler-
ing can be  used to  request line  discipline from  the link  partner in
State Idle.  The use of cellphones  is also an option,  whereas throwing
objects or using guns is not recommended.                RFC 4824



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