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

Function expected_map_error_impl

include/experimental/expected.hpp:1167–1173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1165 enable_if_t<!is_void_v<Ret>> * = nullptr,
1166 class Result = expected<T, decay_t<Ret>>>
1167constexpr Result expected_map_error_impl(Exp &&exp, F &&f) {
1168 if (exp.has_value()) {
1169 return Result(*std::forward<Exp>(exp));
1170 }
1171 return Result(unexpect,
1172 invoke(std::forward<F>(f), std::forward<Exp>(exp).error()));
1173}
1174
1175template <class Exp, class F, class T = typename decay_t<Exp>::value_type,
1176 enable_if_t<!is_void_v<T>> * = nullptr,

Callers 1

map_errorFunction · 0.85

Calls 1

has_valueMethod · 0.45

Tested by

no test coverage detected