Skip to content

Instantly share code, notes, and snippets.

@mcobzarenco
Created December 1, 2013 19:37
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 mcobzarenco/7739816 to your computer and use it in GitHub Desktop.
Save mcobzarenco/7739816 to your computer and use it in GitHub Desktop.
unique_ptr<string> f(bool b) {
unique_ptr<string> p(new string("ok!"));
unique_ptr<string> p2(new string("okish!"));
if(b) {
return p;
} else {
return p2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment