fork download
  1. #include <iostream>
  2.  
  3. struct C{
  4. C()
  5. { std::cout<<"Contructor"<<std::endl; }
  6.  
  7. C(const C& rhs)
  8. { std::cout<<"COPY" << std::endl; }
  9.  
  10. template<typename T>
  11. C operator=(const T& rhs)
  12. { std::cout <<"Assing"<<std::endl; return C(); }
  13.  
  14. };
  15.  
  16. int main() {
  17. std::cout << "Hello, world!" << std::endl;
  18. C x = x;
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 2680KB
stdin
Standard input is empty
stdout
Hello, world!
COPY