fork download
  1. #include <iostream>
  2. #include <type_traits>
  3. using namespace std;
  4.  
  5. struct A
  6. {
  7. A(const A&) {}
  8. };
  9.  
  10. struct B
  11. {
  12. B(const B&) {};
  13. private:
  14. B(B&&);
  15. };
  16.  
  17. struct C
  18. {
  19. C(const C&) {};
  20. C(C&&) = delete;
  21. };
  22.  
  23. int main()
  24. {
  25. cout << boolalpha << is_move_constructible<A>::value << endl;
  26. cout << boolalpha << is_move_constructible<B>::value << endl;
  27. cout << boolalpha << is_move_constructible<C>::value << endl;
  28. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
true
false
false