fork(1) download
  1. #include <iostream>
  2. #define P(x) std::cout<<x<<std::endl
  3.  
  4. struct Yoba
  5. {
  6. Yoba() { P("new"); }
  7. Yoba(const Yoba & copy) { P("copy") ;}
  8. Yoba(Yoba && move) { P("move"); }
  9. ~Yoba() { P("del"); }
  10. };
  11.  
  12. int main()
  13. {
  14. Yoba a;
  15. Yoba b = std::move(a);
  16. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
new
move
del
del