MCPcopy 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
42template <typename T>
43auto 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
49constexpr int32_t staticCastAs(Num const &input)
50{

Callers

nothing calls this directly

Calls 1

kindMethod · 0.45

Tested by

no test coverage detected