Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

std::optional — Standardizing Optionals over References - A Case Study - Steve Downey - C++Now 2025

Автор: CppNow

Загружено: 2025-09-08

Просмотров: 2642

Описание:

https://www.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: https://github.com/boostcon/cppnow_pr...

Join think-cell as a C++ Developer and work on cutting-edge challenges with a focus on code excellence, innovation, and working alongside an international team of experts — apply now to be part of a team shaping the future of business presentations. https://www.think-cell.com/en/career
---

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 - 27th April - 1st 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 - https://www.cppnow.org
  / cppnow​  
  / cppnow  
  / cppnow  
  / cppnow  
https://mastodon.social/@cppnow
Video Sponsors: think-cell and Bloomberg
---

Videos Filmed & Edited By Bash Films: https://bashfilms.com/
YouTube Channel Managed & Optimized By Digital Medium Ltd: https://events.digital-medium.co.uk
---

#optionals #references #boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus

std::optional — Standardizing Optionals over References - A Case Study - Steve Downey - C++Now 2025

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

array(0) { }

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]