MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / value_or

Function value_or

extlibs/sol3/include/sol/sol.hpp:4816–4819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4814 /// \group value_or
4815 template <class U>
4816 constexpr T value_or(U&& u) const& {
4817 static_assert(std::is_copy_constructible<T>::value && std::is_convertible<U&&, T>::value, "T must be copy constructible and convertible from U");
4818 return has_value() ? **this : static_cast<T>(std::forward<U>(u));
4819 }
4820
4821 /// \group value_or
4822 template <class U>

Callers

nothing calls this directly

Calls 1

has_valueFunction · 0.85

Tested by

no test coverage detected