Synopsis
Declared in <beman/optional/optional.hpp>
template<class T>
class optional;
Types
Name |
Description |
Type alias for the const iterator type of the optional. |
|
Type alias for the iterator type of the optional. |
|
Type alias for the value type stored in the optional. |
Member Functions
Name |
Description |
|
Constructors |
|
Destructs the optional. |
|
Destroys the optional and its value if it has one. |
Assignment operators |
|
Returns an optional containing the result of applying |
|
|
|
|
|
|
|
Returns whether or not the optional has a value. |
|
Returns a reference to the stored value. |
|
Returns a pointer to the stored value. |
|
Returns an optional containing the stored value if it has one, or the result of applying |
|
Resets the optional to an empty state, destroying the stored value if there is one. |
|
Swaps this optional with the other. |
|
Returns an optional containing the result of applying |
|
Returns a reference to the stored value. |
|
Returns a reference to the stored value. |
|
Converts the optional to a boolean indicating whether it has a value. |
Data Members
Name |
Description |
|
The empty state of the optional. |
|
The stored value of the optional. |
Friends
Name |
Description |
Template Parameters
Name |
Description |
T |
Created with MrDocs