MCPcopy Create free account
hub / github.com/NativeScript/android / and_then_impl

Function and_then_impl

test-app/runtime/src/main/cpp/ada/ada.h:3728–3734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3726 class Ret = decltype(detail::invoke(std::declval<F>(),
3727 *std::declval<Exp>()))>
3728constexpr auto and_then_impl(Exp &&exp, F &&f) {
3729 static_assert(detail::is_expected<Ret>::value, "F must return an expected");
3730
3731 return exp.has_value()
3732 ? detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp))
3733 : Ret(unexpect, std::forward<Exp>(exp).error());
3734}
3735
3736template <class Exp, class F,
3737 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,

Callers 1

and_thenMethod · 0.85

Calls 2

invokeFunction · 0.85
has_valueMethod · 0.45

Tested by

no test coverage detected