Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BowenFu/matchit.cpp
/ get_if
Function
get_if
sample/customAsPointer.cpp:43–47 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
41
42
template <typename T>
43
auto get_if(Num const *num)
44
{
45
std::cout <<
"get_if"
<< std::endl;
46
return static_cast<T const *>(num->kind() == T::k ? num : nullptr);
47
}
48
49
constexpr int32_t staticCastAs(Num const &input)
50
{
Callers
nothing calls this directly
Calls
1
kind
Method · 0.45
Tested by
no test coverage detected