[#beman-optional-optional-06-or_else] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-06.adoc[optional<T&>]::or_else :relfileprefix: ../../../ :mrdocs: Calls a function if the optional is empty. == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class F> constexpr xref:beman/optional/optional-06.adoc[optional<T&>] or_else(F&& f) const; ---- == Description The return type is the same as the return type of `f,` which must return an optional type. == Return Value * optional * optional<T&> [.small]#Created with https://www.mrdocs.com[MrDocs]#