fork download
  1. #include <iostream>
  2.  
  3. class track {
  4. struct root_type {
  5. root_type() {}
  6. root_type(const root_type& rhs) {std::cout << "copy";}
  7. root_type(root_type&& rhs) {std::cout << "move";}
  8. } root;
  9. };
  10.  
  11. int main() {
  12. track mov_trak_0;
  13. track mov_trak_3(std::move(mov_trak_0));
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
move