bsl::optional::transform

Same as the transform overload taking &.

Synopsis

Declared in <bslstl_optional.h>

template<class t_FUNC>
constexpr
auto
transform(t_FUNC&& func) const &;

Return Value

optional containing the result of func, or empty if disengaged

Parameters

NameDescription
funccallable invoked with the contained value or when empty