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

Function getClassName

sample/getClassName.cpp:15–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13};
14
15constexpr auto getClassName(Shape const &s)
16{
17 using namespace matchit;
18 return match(s)(pattern | as<Circle>(_) = expr("Circle"),
19 pattern | as<Square>(_) = expr("Square"));
20}
21
22int32_t main()
23{

Callers 1

mainFunction · 0.70

Calls 2

matchFunction · 0.50
exprFunction · 0.50

Tested by

no test coverage detected