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

Function optional_map_impl

include/sol/optional_implementation.hpp:1641–1643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1639 template <class Opt, class F, class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Opt>())),
1640 detail::enable_if_t<!std::is_void<Ret>::value>* = nullptr>
1641 constexpr auto optional_map_impl(Opt&& opt, F&& f) {
1642 return opt.has_value() ? detail::invoke(std::forward<F>(f), *std::forward<Opt>(opt)) : optional<Ret>(nullopt);
1643 }
1644
1645 template <class Opt, class F, class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Opt>())),
1646 detail::enable_if_t<std::is_void<Ret>::value>* = nullptr>

Callers 2

mapMethod · 0.85
mapMethod · 0.85

Calls 3

invokeFunction · 0.85
make_optionalFunction · 0.85
has_valueMethod · 0.45

Tested by

no test coverage detected