This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: missing "std::move"


fafa wrote:

Hi all,

I tried to compile some rvalue reference examples by (from H.Hinnant at
http://home.twcny.rr.com/hinnant/cpp_extensions/rvalue_ref_rationale.html)


with one of the latest GCC 4.3 snapshots, but I'm getting
    error: 'move' is not a member of 'std'

What can I do to get this working ?

Provide a std::move? ;) std::move is evidently a library function in namespace std and you should provide one, because we are not delivering yet a complete C++0x library. For example this one (directly from N1690) should work:


   template <class T>
   inline typename remove_reference<T>::type&&
   move(T&& x)
   { return x; }

(of course remember to include <type_traits>)

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]