feelfree feelfree - 9 months ago 47
C++ Question

the counterpart of std::move in boost library

I am trying to use

in my codes, but the compiler (g++ 4.4) I am using does not support it. Can
completely? Thanks.


std::move (and boost::move) is just a cast from T& to T&&. It does not actually move anything. This means that the specific type of pointer T&& must be supported by the compiler. GCC supports r-value references since version 4.3, so the boost version should be fine.

However, is there a reason you can't use std::move from #include <utility>?


You just need to make sure to specify -std=c++0x as a compiler option in order to enable the limited c++11 support that gcc 4.4 has.