This is an older version of Boost and was released in 2024. The current version is 1.88.0.
C++
11
Added in Boost
1.30.0
Categories:
Data
A value-semantic, type-safe wrapper for representing 'optional' (or 'nullable') objects of a given type. An optional object may or may not contain a value of the underlying type.
This Release
Andrzej Krzemieński
Andrzej Krzemieński
Maintainer
typenameTea
typenameTea
Contributor - New
Rene Rivera
Rene Rivera
Contributor
Alexander Grund
Alexander Grund
Contributor
Peter Dimov
Peter Dimov
Contributor
Andrey Semashev
Andrey Semashev
Contributor
Tosiekdev
Tosiekdev
Contributor
Dependencies
Assert
Config
Core
ThrowException
Type Traits
Removed
Detail
Move
Predef
Static Assert
Utility
optional
A library for representing optional (nullable) objects in C++.
optional<int> readInt(); // this function may return either an int or a not-an-int
if (optional<int> oi = readInt()) // did I get a real int
cout << "my int is: " << *oi; // use my int
else
cout << "I have no int";
For more information refer to the documentation provided with this library.
All Time
Fernando Cacciola
Fernando Cacciola
Contributor
Josh Soref
Josh Soref
Contributor
Steven Watanabe
Steven Watanabe
Contributor
Beman Dawes
Beman Dawes
Contributor
Daniel James
Daniel James
Contributor
Troy D. Straszheim
Troy D. Straszheim
Contributor
Stephen Kelly
Stephen Kelly
Contributor
Dave Abrahams
Dave Abrahams
Contributor
Marshall Clow
Marshall Clow
Contributor
Douglas Gregor
Douglas Gregor
Contributor
Vladimir Prus
Vladimir Prus
Contributor
Matias Capeletto
Matias Capeletto
Contributor
John Maddock
John Maddock
Contributor
Nikita Kniazev
Nikita Kniazev
Contributor
Edward Diener
Edward Diener
Contributor
Hartmut Kaiser
Hartmut Kaiser
Contributor