fork(3) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. class A
  6. {
  7. public:
  8. A(){std::cout << "constr" << std::endl;}
  9. ~A(){std::cout<<"dest"<<std::endl;}
  10. };
  11.  
  12. int main() {
  13. std::vector<A> a;
  14. a.emplace_back();
  15. a.emplace_back();
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3416KB
stdin
Standard input is empty
stdout
constr
constr
dest
dest
dest