Is it more efficient to return a const reference
A function should never return a reference to a local object/variable since such objects go out of the scope and get destroyed when the function returns. Differently, the function can return a const or non const reference to an object whose scope is not limited by the function context. Typical example is a custom operator<<: Unfortunately, returning-by-value has … Read more