#include #include template< typename T > struct has_move_constructor { public: struct helper { template< typename U > operator U&&() const; }; private: template< typename U > static typename std::enable_if< std::is_same< decltype( U( helper() ) ), U >::value, char >::type test( U* ); static long test( ... ); public: static const bool value = sizeof( test( ((T*)0) ) ) != 1; }; struct T0 { }; struct T1 { T1( const T1& ); }; struct T2 { T2( T2&& ); }; struct T3 { T3( const T3& ); T3( T3&& ); }; int main() { std::cout << has_move_constructor< T0 >::value << std::endl; std::cout << has_move_constructor< T1 >::value << std::endl; std::cout << has_move_constructor< T2 >::value << std::endl; std::cout << has_move_constructor< T3 >::value << std::endl; }