References, simply
Sutter's Mill
FEBRUARY 23, 2020
Sometimes they’re useful as local variables, but pointers or structured bindings are usually better. Sometimes, a reference can also be useful as a local variable, though in modern C++ a pointer or structured binding is usually better (see Q&A). References are for parameter passing, including range- for. That’s it.
Let's personalize your content