MCPcopy Create free account
hub / github.com/ceph/ceph / map_error_impl

Function map_error_impl

src/include/expected.hpp:2213–2219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2211 std::declval<Exp>().error())),
2212 detail::enable_if_t<!std::is_void<Ret>::value> * = nullptr>
2213constexpr auto map_error_impl(Exp &&exp, F &&f) {
2214 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
2215 return exp.has_value()
2216 ? result(*std::forward<Exp>(exp))
2217 : result(unexpect, detail::invoke(std::forward<F>(f),
2218 std::forward<Exp>(exp).error()));
2219}
2220template <class Exp, class F,
2221 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
2222 class Ret = decltype(detail::invoke(std::declval<F>(),

Callers 2

map_errorMethod · 0.85
transform_errorMethod · 0.85

Calls 3

invokeFunction · 0.70
has_valueMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected