Invoke the specified func on the contained value and return its optional result as a const rvalue.

Synopsis

Declared in <bslstl_optional.h>

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