[#bsl-optional-072-and_then-09] = xref:bsl.adoc[bsl]::xref:bsl/optional-072.adoc[optional]::and_then :relfileprefix: ../../ :mrdocs: Invoke the specified `func` on the contained value and return its optional result as an rvalue. == Synopsis Declared in `<bslstl_optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_FUNC> constexpr auto and_then(t_FUNC&& func) &&; ---- == Return Value result of `func` if engaged, otherwise an empty optional == Parameters [cols="1,4"] |=== | Name| Description | *func* | callable invoked with the contained value or when empty |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#