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-14 11:07:13


>> The boost::swap utility forwards its task to a helper function,
>> ::boost_swap_impl::swap_impl. [...]
>> I think it's preferable to remove the top-level namespace,
>> "boost_swap_impl", and move the helper function into the boost
>> namespace. For instance within a new nested namespace,
>> boost::swap_impl_detail.

Joseph Gauterin wrote:
> I'm not sure about that - I tried removing it after we removed the ADL
> barrier and it caused a stack overflow (MSVC8) on some of the tests.

That looks very, very weird to me... And now I see, I get a stack
overfow as well, after moving boost_swap_impl::swap_impl to the boost
namespace, within my local copy of trunk/boost/utility/swap.hpp. I
tried MSVC9 (SP1 not yet applied).

My local copy of trunk/libs/utility/swap/test/primitive.cpp says:
> Running 1 test case...
> unknown location(0): fatal error in "test_main_caller( argc, argv )": stack overflow

I'm clueless now. How could moving boost_swap_impl::swap_impl to the
boost namespace possibly cause a stack overflow? Is it a known MSVC
issue?

Kind regards, Niels


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