<beman/optional/optional.hpp>
template<class T>
class optional;
Name | Description |
---|---|
const_iterator | Type alias for the const iterator type of the optional. |
iterator | Type alias for the iterator type of the optional. |
value_type | Type alias for the value type stored in the optional. |
Name | Description |
---|---|
optional [constructor] | Constructors |
~optional [destructor] | Destructors |
operator= | Assignment operators |
and_then | Returns an optional containing the result of applying f to the stored value. |
begin | begin overloads |
emplace | emplace overloads |
end | end overloads |
has_value | Returns whether or not the optional has a value. |
operator* | Returns a reference to the stored value. |
operator-> | Returns a pointer to the stored value. |
or_else | Returns an optional containing the stored value if it has one, or the result of applying f to the optional if it does not. |
reset | Resets the optional to an empty state, destroying the stored value if there is one. |
swap | Swaps this optional with the other. |
transform | Returns an optional containing the result of applying f to the stored value, or a default value if there is no stored value. |
value | Returns a reference to the stored value. |
value_or | Returns a reference to the stored value. |
operator bool | Converts the optional to a boolean indicating whether it has a value. |
Name | Description |
---|---|
_ [variant member] | The empty state of the optional. |
value_ [variant member] | The stored value of the optional. |
Name | Description |
---|---|
optional |
Name | Description |
---|---|
operator!= | Inequality operator |
operator!= | Inequality operator |
operator< | Less-than operator |
operator< | Less-than operator |
operator<= | Less-than-or-equal operator |
operator<= | Less-than-or-equal operator |
operator<=> | Three-way comparison operator |
operator<=> | Three-way comparison operator |
operator<=> | Three-way comparison operator |
operator== | Equality operator |
operator== | Equality operator |
operator== | Equality operator |
operator> | Greater-than operator |
operator> | Greater-than operator |
operator>= | Greater-than-or-equal operator |
operator>= | Greater-than-or-equal operator |