
There's another update on the Swaptimization issue at the Visual C++ Blog (please scroll to the end): http://blogs.msdn.com/vcblog/archive/2008/08/11/tr1-fixes-in-vc9-sp1.aspx So MSVC's Swaptimization has a few bugs concerning std::pair, tr1::array, tr1::tuple, and tr1::function. Fortunately they're considering a hotfix. Still, if we're going to add Swaptimization support to Boost (by adding _Move_operation_category<T> specializations), we have to realize that it will only be for one specific compiler version: MSVC 9 SP1. MSVC 10 will no longer do Swaptimization. Before SP1, MSVC 9 also supported Swaptimization, but it called std::swap without argument-dependent lookup :-( Only MSVC 9 SP1 does ADL, when calling swap. Michael Marcin wrote:
Unless you consider swaps like boost::function's a bug I don't think it is fair to assume swap means fast move in general.
Did you take a look at the boost::function::swap patch I submitted a few months ago? http://svn.boost.org/trac/boost/ticket/1910 Do you think it would correctly solve the function::swap issue? Kind regards, Niels