El 10/07/2012 23:55, Jeffrey Lee Hellrung, Jr. escribió:
ADL doesn't really seem appropriate here, does it? Sounds like you intend to call std::move regardless of the arguments.
I agree. You should qualify std::move or "using std::move";. You could define another move(xxx) function in another namespace and have the same problem.
I did notice that if I define the macro BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE, the compilation errors disappear. Is this the correct approach for compilers which support std::move? I find it odd that this macro isn't already defined for such compilers.
Well, (a) based on my quick reading of move.hpp, that looks like it should do the thing you want; and (b) I don't the know the rationale for not defining it for C++11 compilers, perhaps Ion can comment.
It was an experiment, as Boost.Config does not detect the presence of std::move. This macro should be activated for compilers with rvalue references plus and an updated standard library. Best, Ion