Skip to content

Glossary: Software Design Patterns in C++

const reference

Also written: const&, const reference return

A reference that lets callers read an object but not change it. `MemoryRepo::all()` returns one so callers can look at orders but not damage the vector.

Where the book teaches it

Related terms

Repository