lapthorn.net *this.that(&theOther);

std::unique_ptr usage

If you’re new to C++11, this post on Stackoverflow answers the question “How do I pass a unique_ptr argument to a constructor or a function?” going through each case:

  • by value
  • by non-const l-value reference
  • by const l-value reference
  • by r-value reference

© 2017   lapthorn.net