Skip to content

Instantly share code, notes, and snippets.

@mikkkee
Last active March 4, 2022 09:23
Show Gist options
  • Save mikkkee/c8cf3b475e6744d65dab to your computer and use it in GitHub Desktop.
Save mikkkee/c8cf3b475e6744d65dab to your computer and use it in GitHub Desktop.
Helpful C++ questions on stackoverflow

Questions

Notes

  • If you're going to make a copy of something in a function, let the compiler do it in the parameter list.
  • the goal of move-construction: to take the resources from another instance of the class, leaving it in a state guaranteed to be assignable and destructible.
  • rvalues denote temporary objects which are destroyed at the next semicolon (to be more precise: at the end of the full-expression that lexically contains the rvalue).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment