From: Joseph Gauterin (joseph.gauterin_at_[hidden])
Date: 2008-08-16 08:07:24
> Anyway, I'm certainly in favor of having Boost's swap utility named
I agree - the important thing is that a call to boost::swap swaps its
arguments, not the exact mechanism by which it swaps the arguments.
Also, there's a clear precedent with the standard library - the
algorithm are all named after what they do, not how they do it (swap,
sort, remove etc).
>// - swap_impl is put outside the boost namespace, to avoid infinite
>// recursion (stack overflow) when swapping objects of a primitive type.
Does the infinite recursion only happen using primitive types - and if
so do you know why?
If it does, then it might be possible to move the boost_swap_impl
namespace inside namespace boost using some sort of SFINAE technique
to explicitly call std::swap for primitive types.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk