Subject: Re: [boost] [swap] please update documentation...
From: Peter Simons (simons_at_[hidden])
Date: 2009-06-30 05:31:15
> Adam and Peter, could you please also test the following on g++ 4.4.0?
the program compiles fine, which made me wonder about my earlier report that
gcc 4.4.0 would choose boost::swap in the example program we previously
talked about. So I tried to repeat my finding. I edited an
std::cout << __PRETTY_FUNCTION__ << std::endl;"
into <boost/utility/swap.hpp>, compiled the following program, and ran it:
int main(int, char * )
boost::swap(a1, a2); // Okay.
swap(a1, a2); // Does not compile!
Surely enough, the output is
g++ -pedantic test.cpp && ./a.out
void boost::swap(T1&, T2&) [with T1 = std::string , T2 = std::string ]
..., just like last time but then I looked real hard at the source code and
finally noticed that the program calls boost::swap() explicitly, too, which
is where that debug output comes from.
In other words, I was wrong: gcc 4.4.0 does *not* pick boost::swap by ADL in
I'm sorry for causing confusion.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk