std::unique_ptr usage

Jul 5, 2013 at 19:00

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