2607
2607

Reputation: 4115

C++11 GCC 4.6.2 std::move

I tried to use move constructor, with std::move

#include <utility>

But I receive an error, ‘move’ is not a member of ‘std’.

gcc --version
gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)

I understand move constructor is a new feature in C++11, just wondering whether it is available in gcc 4.6.2 yet.

Thanks.

Upvotes: 2

Views: 4663

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473447

Did you compile with the C++0x flag on (-std=c++0x)? g++ defaults to C++03.

Upvotes: 8

Related Questions