Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/davisking/dlib
/ value_or
Method
value_or
dlib/optional.h:655–658 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
653
654
template <class U>
655
constexpr T value_or(U &&u) const &
656
{
657
return *this ? **this : static_cast<T>(std::forward<U>(u));
658
}
659
660
template <class U>
661
constexpr T value_or(U &&u) &&
Callers
2
test_optional_int
Function · 0.80
test_optional_int_constexpr
Function · 0.80
Calls
1
move
Function · 0.85
Tested by
2
test_optional_int
Function · 0.64
test_optional_int_constexpr
Function · 0.64