and_then overloads
Declared in <bslstl_optional.h>
Invoke func on the contained value, or return an empty optional.
template<class t_FUNC>
constexpr
auto
and_then(t_FUNC&& func) &;
» more...
Invoke the specified func on the contained value and return its optional result as a const lvalue.
template<class t_FUNC>
constexpr
auto
and_then(t_FUNC&& func) const &;
» more...
Invoke the specified func on the contained value and return its optional result as an rvalue.
template<class t_FUNC>
constexpr
auto
and_then(t_FUNC&& func) &&;
» more...
Invoke the specified func on the contained value and return its optional result as a const rvalue.
template<class t_FUNC>
constexpr
auto
and_then(t_FUNC&& func) const &&;
» more...
result of func if engaged, otherwise an empty optional
| Name | Description |
|---|---|
| func | callable invoked with the contained value or when empty |