and_then overloads
Synopses
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) &;
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 &;
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) &&;
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 &&;
Return Value
result of func if engaged, otherwise an empty optional
Parameters
Name |
Description |
func |
callable invoked with the contained value or when empty |
Created with MrDocs