fork download
  1. #include <iostream>
  2. #include <memory>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. class A
  8. {
  9. int huy;
  10. };
  11. class B: public A
  12. {
  13. int chlen;
  14. };
  15.  
  16.  
  17. A &&x1=B();
  18. shared_ptr<A> x2(B()); //сбацает копию или пирменит move semantics
  19. // your code goes here
  20. return 0;
  21. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
Standard output is empty