What are the differences between rvalue references as implemented in Visual Studio 2010 and as specified in the C++11? Are there any particular pitfalls to watch out for when using revalue references in Visual Studio 2010 that could make source invalid or working differently if compiled by C++11 conforming compiler?
According to this table, VS2010 supports rvalue references version 2.0 (the current version is 2.1 IIRC).
The important difference between 2.0 and 2.1 is that the latter allows implicit conversions:
std::string&& x = "hello"; // legal in 2.1, illegal in 2.0
Also note that VS2010 does not yet support overloading on the rvalueness of *this
.
void Foo::foo() && { ... } // not yet supported in VS2010