fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A {
  5. int b;
  6. A() : b(0){}
  7. };
  8.  
  9.  
  10. int main() {
  11. A z; // z is an object
  12. A() = z; // A() is a temporary object that is coing to expire.
  13.  
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty