MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / expected_map_impl

Function expected_map_impl

crates/cpp/test_headers/expected.hpp:2102–2107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100 *std::declval<Exp>())),
2101 detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2102constexpr auto expected_map_impl(Exp &&exp, F &&f) {
2103 using result = ret_t<Exp, detail::decay_t<Ret>>;
2104 return exp.has_value() ? result(detail::invoke(std::forward<F>(f),
2105 *std::forward<Exp>(exp)))
2106 : result(unexpect, std::forward<Exp>(exp).error());
2107}
2108
2109template <class Exp, class F,
2110 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,

Callers 2

mapMethod · 0.85
transformMethod · 0.85

Calls 2

invokeFunction · 0.85
has_valueMethod · 0.45

Tested by

no test coverage detected