Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Created February 6, 2015 01:13
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 c0ldlimit/6d9c4a683860ccc1890c to your computer and use it in GitHub Desktop.
Save c0ldlimit/6d9c4a683860ccc1890c to your computer and use it in GitHub Desktop.
int f( object a) {
int z = 5;
return z; // RVO
return std::move(z);
}
int f2( object& a) {
int z = 5;
return z; // RVO
return std::move(z);
}
int main() {
object a;
int z = f(std::move(a));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment