Subject: Re: [boost] [swap] please update documentation...
From: Niels Dekker - address until 2010-10-10 (niels_address_until_2010-10-10_at_[hidden])
Date: 2009-06-29 13:33:18
>> I'm very surprised it doesn't pick std::swap, as found by
>> argument-dependent lookup. What version of GCC are you using exactly?
Peter Simons wrote:
> The test program was compiled with g++ 4.4.0 20090526 (prerelease) on
Thanks Peter! It looks like a brandnew GCC bug to me... Can you please
confirm that the following simplified version also compiles and runs on
your installation of GCC 4.4.0? And if so, does it indeed throw
"foo::swap is called"?
template<class T1, class T2>
void swap(T1&, T2&)
throw "foo::swap is called";
So far, I've tried Comeau C/C++ 126.96.36.199 (online at
www.comeaucomputing.com/tryitout), MSVC 2008 SP1, gcc-4 (GCC) 4.3.2
20080827 (beta) 2 within cygwin, and g++ 4.1.2 at
http://codepad.org/76xnAQ7n None of them pick foo::swap. Instead, all
of them yield a compile error, trying to call std::swap.
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