Saturday, October 3, 2020

Tips on return reference from a function

Tips on return reference from a function: "return a reference to an object c++"

"return a reference from a function c++"

  1. C++ tip 14: Don't return a reference when you must return an object
  2. C++ tip 13: Prefer pass-by-reference-to-const to pass-by-value
  3. C++ tip 15: Delay construction of objects until they are needed

No comments:

Post a Comment