fork download
  1. #include <type_traits>
  2.  
  3. struct test {
  4. virtual void foo() noexcept = 0;
  5. };
  6.  
  7. struct test2 : test {
  8. void foo() noexcept override final {}
  9. };
  10.  
  11. // fails
  12. static_assert(std::is_move_constructible<test>::value, "test not move constructible");
  13. // succeeds
  14. static_assert(std::is_move_constructible<test2>::value, "test2 not move constructible");
  15.  
Compilation error #stdin compilation error #stdout 0s 3092KB
stdin
Standard input is empty
compilation info
prog.cpp:12:1: error: static assertion failed: test not move constructible
 static_assert(std::is_move_constructible<test>::value, "test not move constructible");
 ^
stdout
Standard output is empty