Returns an optional containing the result of applying f to the contained value, or an empty optional if there is no contained value.
Synopses
Declared in <beman/optional/optional.hpp>
Returns an optional containing the result of applying f to the contained value, or an empty optional if there is no contained value.
template<class F>
constexpr
auto
transform(F&& f) &;
Returns an optional containing the result of applying f to the contained value, or an empty optional if there is no contained value.
template<class F>
constexpr
auto
transform(F&& f) &&;
Returns an optional containing the result of applying f to the contained value, or an empty optional if there is no contained value.
template<class F>
constexpr
auto
transform(F&& f) const &;
Returns an optional containing the result of applying f to the contained value, or an empty optional if there is no contained value.
template<class F>
constexpr
auto
transform(F&& f) const &&;
Return Value
-
optional
-
auto
Parameters
| Name | Description |
|---|---|
f |
An invocable to apply to the contained value. |
Created with MrDocs