MCPcopy Create free account
hub / github.com/JDAI-CV/DNNLibrary / value_or

Function value_or

include/common/expected.hpp:1926–1931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1924 TL_EXPECTED_11_CONSTEXPR E &&error() && { return std::move(err().value()); }
1925
1926 template <class U> constexpr T value_or(U &&v) const & {
1927 static_assert(std::is_copy_constructible<T>::value &&
1928 std::is_convertible<U &&, T>::value,
1929 "T must be copy-constructible and convertible to from U&&");
1930 return bool(*this) ? **this : static_cast<T>(std::forward<U>(v));
1931 }
1932 template <class U> TL_EXPECTED_11_CONSTEXPR T value_or(U &&v) && {
1933 static_assert(std::is_move_constructible<T>::value &&
1934 std::is_convertible<U &&, T>::value,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected