MCPcopy Create free account
hub / github.com/ThePhD/sol2 / map_or_else

Method map_or_else

include/sol/optional_implementation.hpp:982–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980 /// \synopsis template <class F, class U> \n auto map_or_else(F &&f, U &&u) &;
981 template <class F, class U>
982 detail::invoke_result_t<U> map_or_else(F&& f, U&& u) & {
983 return has_value() ? detail::invoke(std::forward<F>(f), **this) : std::forward<U>(u)();
984 }
985
986 /// \group map_or_else
987 /// \synopsis template <class F, class U> \n auto map_or_else(F &&f, U &&u)

Callers

nothing calls this directly

Calls 2

has_valueFunction · 0.85
invokeFunction · 0.85

Tested by

no test coverage detected