MCPcopy Create free account
hub / github.com/davisking/dlib / and_then

Method and_then

dlib/optional.h:676–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674 std::enable_if_t<details::is_optional<Return>::value, bool> = true
675 >
676 constexpr auto and_then(F&& f) &
677 {
678 if (*this)
679 return dlib::invoke(std::forward<F>(f), **this);
680 else
681 return Return{};
682 }
683
684 template <
685 class F,

Callers 2

test_optional_int_monadsFunction · 0.80

Calls 2

invokeFunction · 0.85
moveFunction · 0.85

Tested by 2

test_optional_int_monadsFunction · 0.64