public
Last active

  • Download Gist
oops_auto_ptr.cpp
C++
1 2 3 4
typedef vector<auto_ptr<foo> > foo_vector;
foo_vector fv;
fv.push_back(auto_ptr<foo>(new foo()));
auto_ptr<foo> p = fv[0]; // oops

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.