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

Method or_else

dlib/optional.h:784–787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

782 std::enable_if_t<std::is_same<U, dlib::optional<T>>::value, bool> = true
783 >
784 constexpr optional or_else( F&& f ) const&
785 {
786 return *this ? *this : std::forward<F>(f)();
787 }
788
789 template <
790 class F,

Callers 1

test_optional_int_monadsFunction · 0.80

Calls 1

moveFunction · 0.85

Tested by 1

test_optional_int_monadsFunction · 0.64