MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / expected_map_impl

Function expected_map_impl

include/experimental/expected.hpp:1114–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1112 enable_if_t<!is_void_v<Ret>> * = nullptr,
1113 class Result = expected<decay_t<Ret>, E>>
1114constexpr Result expected_map_impl(Exp &&exp, F &&f) {
1115 if (exp.has_value()) {
1116 return Result(invoke(std::forward<F>(f), *std::forward<Exp>(exp)));
1117 }
1118 return Result(unexpect, std::forward<Exp>(exp).error());
1119}
1120
1121template <class Exp, class F, class T = typename decay_t<Exp>::value_type,
1122 class E = typename decay_t<Exp>::error_type,

Callers 1

mapFunction · 0.85

Calls 1

has_valueMethod · 0.45

Tested by

no test coverage detected