MCPcopy Create free account
hub / github.com/BowenFu/matchit.cpp / get_if

Function get_if

sample/Closed-Class-Hierarchy.cpp:38–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37template <typename T>
38auto get_if(Shape const *shape)
39{
40 return static_cast<T const *>(shape->kind == T::k ? shape : nullptr);
41}
42
43double get_area(const Shape &shape)
44{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected