Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Explore the complex 20-year journey of standardizing optional references in C++ through this comprehensive conference talk from C++Now 2025. Trace the evolution from the initial 2005 proposal through the addition of std::optional in C++17 to the upcoming optional reference support in C++26, examining the technical challenges and design decisions that made this process so lengthy. Delve into the fundamental tension between reference semantics and value semantics in C++, understanding why references don't fit comfortably within the type system and how this affects container types like optional, expected, and variant. Learn about the progression of key proposals including N1878, P1175R0, P1683R0, P2988R0, and P3168R0, discovering how each addressed different concerns and contributed to the final design. Examine the trap of assignment behavior being state-dependent in optional references and understand how the community worked to resolve these issues. Gain insights into the ISO Standards Process and Project Beman's role in providing visibility and feedback for the reference implementation. Understand broader implications for sum types, product types, CoData, and lifetime safety in modern C++. Discover how the optional range support proposal (P3168R0) integrated with optional references and became one of the first Beman libraries, demonstrating the value of community-driven development in language standardization.
Syllabus
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.
Taught by
CppNow