Skip to content

Instantly share code, notes, and snippets.

@bradphelan
Created July 29, 2010 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradphelan/498683 to your computer and use it in GitHub Desktop.
Save bradphelan/498683 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment