Mutable reference

In contrast to a const reference, a mutable reference cannot bind to a temporary. We use auto& to denote mutable references. Use mutable references only when you intent to change the object it references.

Get C++ High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.