fork download
  1. #include <stdio.h>
  2.  
  3. struct A {
  4. A() { puts(__PRETTY_FUNCTION__); }
  5. ~A() { puts(__PRETTY_FUNCTION__); }
  6. A(const A&) { puts(__PRETTY_FUNCTION__); }
  7. A(A&&) { puts(__PRETTY_FUNCTION__); }
  8. A& operator=(const A&) { puts("copy"); return *this; }
  9. A& operator=(A&&) { puts("move"); return *this; }
  10. };
  11.  
  12.  
  13. int main() {
  14. auto a = A();
  15. return 0;
  16. }
Success #stdin #stdout 0s 4152KB
stdin
Standard input is empty
stdout
A::A()
A::~A()