I would recommend not checking __cplusplus, since neither MSVC nor GCC raised it to 201103L, and both of them have been supporting rvalue references for several years.
You can count on compiler-specific macros to do what you would like:
. , . , __GXX_EXPERIMENTAL_CXX0X__ .
, , Boost.Config. BOOST_NO_RVALUE_REFERENCES.
- :
#include <boost/config.hpp>
class Foo{
public:
Foo();
Foo(Foo&);
#ifndef BOOST_NO_RVALUE_REFERENCES
Foo(Foo&&);
#endif
};
, .