The Evolution of std::optional: From Boost to C++26
Steve Downey
These are notes from Steve Downey's CppCon 2025 talk. He is the main author of P2988, the proposal that pushed std::optional<T&> into C++26. The talk answers a single question: a feature that looks like "just an optional that holds a reference" — why did it take from its first proposal in 2005 until the Sofia meeting in June 2025 to finally pass? The answer runs through the three identities a reference has in C++, the twenty-year assign-through vs. rebind debate, and the final conclusion that "it is, essentially, a constrained pointer."
The notes are split into six parts, moving from the value-version foundation into the reference-version core, then stepping back to look at standardization. All code involving optional<T&> was run on GCC 16.1.1 (-std=c++26) — this is not paper talk.