Synopsis
Declared in <beman/optional/optional.hpp>
template<class T>
class optional<T&>;
Types
Name |
Description |
The type of the iterator for the optional. |
|
The type of the value stored in the optional. |
Member Functions
Name |
Description |
|
Constructors |
|
Destructor. |
Assignment operators |
|
Applies a function to the stored value if there is one. |
|
Returns an iterator to the beginning of the optional. |
|
Converting copy assignment operator. |
|
Returns an iterator to the end of the optional. |
|
Checks if the optional has a value. |
|
Returns a reference to the stored value. |
|
Returns a pointer to the stored value. |
|
Calls a function if the optional is empty. |
|
Resets the optional to an empty state. |
|
Swaps the contents of this optional with another. |
|
Applies a function to the stored value if there is one. |
|
Returns the stored value if there is one, otherwise throws |
|
Returns the stored value if there is one, otherwise returns |
|
Converts the optional to a boolean value. |
Friends
Name |
Description |
Created with MrDocs