Boost logo

Boost :

From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2008-08-16 10:21:47


[Sorry, my previous mail was accidentally sent, before it was finished!
I'll just continue here...]

Joseph Gauterin wrote:
> Does the infinite recursion only happen using primitive types - and if
> so do you know why?

On MSVC (both 7.1 and 9.0), moving ::boost_swap_impl::swap_impl to
::boost::swap_impl introduces failures of the following tests from
/trunk/libs/utility/swap/test/:
 - no_ambiguity_in_boost
 - primitive
 - specialized_in_std
 - std_typeinfo_ptr

Borland 5.82 would have the following extra failures, after moving
swap_impl to boost:
 - primitive
 - specialized_in_std
 - specialized_in_global
 - std_bitset
 - std_dateorder
 - std_string
 - std_typeinfo_ptr
 - std_vector_of_boost
 - std_vector_of_global
 - std_vector_of_other

All of them are stack overflows. So far, I don't know why, exactly.

BTW, here's the patch, adding extra checks to
trunk/libs/utility/swap/test, checking if boost::swap does indeed
exchange the values of its
arguments. Hope you think it's okay... I wouldn't mind committing :-)

Kind regards, Niels

P.S. Isaac, I just added extra explanatory comments to
trunk/boost/utility/swap.hpp. Please take a look:
http://svn.boost.org/trac/boost/changeset/48171



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