Uploaded September 2025 | Updated December 2026, 3 hours ago
cppnow.org
---
std::optional — Standardizing Optionals over References - A Case Study - Steve Downey - C++Now 2025
---
Optionals were first proposed for C++ in 2005.
Optional<T>, where T is constrained not to be a reference, was added in 2017.
Optionals for lvalue references are on track to be added in C++ 26.
What were the concerns that made the process take so long? How were concerns addressed? What did we end up with? And, what remains to be done?
This talk will discuss the early history of Optionals, starting with Boost.Optional and “N1878: A Proposal to Add an Utility Class to Represent Optional Objects (Revision 1)”, and what the early concerns were for the reference specialization. “P1175R0: A Simple and Practical Optional Reference for C++” then re-proposed reference support for C++20, which was not adopted. In 2020, “P1683R0: References for Standard Library Vocabulary Types - an optional<&> case study” surveyed existing behavior of optional references in the wild, and pointed out the trap of assignment behavior being state dependent. In 2023, “P2988R0: Std:Optional” picked up the torch again, and Revision 9 of that is the proposal that is design-approved by the Library Evolution Working Group.
In 2024, “P3168R0: Give Std:Optional Range Support”, the proposal to make optional a range -- as opposed to having a separate range of zero or one -- was adopted. The reference implementation for optional<T&> and the test cases for views::maybe were used to vet the additional interfaces for optional range support. This merged implementation became one of the first Beman libraries, where the library and the optional reference proposal benefited immensely from the visibility and feedback.
The core of the difficulty has been that references are not values, and that types containing a reference do not have value semantics. References do not fit comfortably in the C++ type system. The core value semantic type that also has reference semantics is a pointer, but pointers have under-constrained and unsafe semantics. The lengthy discussion has been a proxy for what reference semantic types should look like in value semantic types within the standard library, particularly for "sum" types, like expected and variant, but also for types, such as single.
This talk will discuss the ISO Standards Process, Project Beman, Value and Reference Semantic Types, Sum and Product Types, CoData, and Lifetime Safety, among other topics.
---
Slides: github.com/boostcon/cppnow_presentations_2025/blob/main/Presentations/std_optional_T&.pdf
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech---
Steve Downey
Steve Downey has been a programmer for more than 30 years. Steve graduated from SUNY Purchase with a BS in Mathematics. A Computer Science degree would have involved two classes before 11:00 am, so was impossible.
He has worked at Bloomberg since 2003, and is currently working as an Engineer on the C++ Infrastructure team.
---
C++Now 2026 - 4th May - 8th May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
Video Sponsors: think-cell and Bloomberg
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#optionals #references #boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus
cppnow.org
---
std::optional — Standardizing Optionals over References - A Case Study - Steve Downey - C++Now 2025
---
Optionals were first proposed for C++ in 2005.
Optional<T>, where T is constrained not to be a reference, was added in 2017.
Optionals for lvalue references are on track to be added in C++ 26.
What were the concerns that made the process take so long? How were concerns addressed? What did we end up with? And, what remains to be done?
This talk will discuss the early history of Optionals, starting with Boost.Optional and “N1878: A Proposal to Add an Utility Class to Represent Optional Objects (Revision 1)”, and what the early concerns were for the reference specialization. “P1175R0: A Simple and Practical Optional Reference for C++” then re-proposed reference support for C++20, which was not adopted. In 2020, “P1683R0: References for Standard Library Vocabulary Types - an optional<&> case study” surveyed existing behavior of optional references in the wild, and pointed out the trap of assignment behavior being state dependent. In 2023, “P2988R0: Std:Optional” picked up the torch again, and Revision 9 of that is the proposal that is design-approved by the Library Evolution Working Group.
In 2024, “P3168R0: Give Std:Optional Range Support”, the proposal to make optional a range -- as opposed to having a separate range of zero or one -- was adopted. The reference implementation for optional<T&> and the test cases for views::maybe were used to vet the additional interfaces for optional range support. This merged implementation became one of the first Beman libraries, where the library and the optional reference proposal benefited immensely from the visibility and feedback.
The core of the difficulty has been that references are not values, and that types containing a reference do not have value semantics. References do not fit comfortably in the C++ type system. The core value semantic type that also has reference semantics is a pointer, but pointers have under-constrained and unsafe semantics. The lengthy discussion has been a proxy for what reference semantic types should look like in value semantic types within the standard library, particularly for "sum" types, like expected and variant, but also for types, such as single.
This talk will discuss the ISO Standards Process, Project Beman, Value and Reference Semantic Types, Sum and Product Types, CoData, and Lifetime Safety, among other topics.
---
Slides: github.com/boostcon/cppnow_presentations_2025/blob/main/Presentations/std_optional_T&.pdf
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech---
Steve Downey
Steve Downey has been a programmer for more than 30 years. Steve graduated from SUNY Purchase with a BS in Mathematics. A Computer Science degree would have involved two classes before 11:00 am, so was impossible.
He has worked at Bloomberg since 2003, and is currently working as an Engineer on the C++ Infrastructure team.
---
C++Now 2026 - 4th May - 8th May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
Video Sponsors: think-cell and Bloomberg
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#optionals #references #boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus










