The Evolution of std::optional: From Boost to C++26
Steve Downey
These are notes from Steve Downey's (Bloomberg) CppCon 2025 talk. He is the primary author of P2988, the proposal that carried std::optional<T&> into C++26. The heart of the talk is one question: a feature that looks like "just a reference that can also be empty" — why was it first proposed in 2005, then held up all the way until the vote at the Sofia meeting in June 2025? The answer runs through the three identities a reference carries in C++, the twenty-year fight between assign-through and rebind, and the final conclusion: "it's just a constrained pointer."
The notes are split into six parts, ordered as "the value-version foundation first, then the reference-version core, then a step back to look at standardization." All the code involving optional<T&> was actually run on GCC 16.1.1 (-std=c++26) — this is not armchair theory.