Skip to content

Instantly share code, notes, and snippets.

@bradphelan
Created July 29, 2010 17:08
Show Gist options
  • Select an option

  • Save bradphelan/498683 to your computer and use it in GitHub Desktop.

Select an option

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