fork(1) download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. struct Foo
  5. {
  6. Foo()
  7. {
  8. }
  9.  
  10. ~Foo()
  11. {
  12. std::cout << "~Foo()\n";
  13. }
  14. };
  15.  
  16. int main()
  17. {
  18. std::vector<Foo> foos;
  19. foos.push_back(Foo());
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
~Foo()
~Foo()