Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
15
constexpr 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
22
int32_t main()
23
{
Callers
1
main
Function · 0.70
Calls
2
match
Function · 0.50
expr
Function · 0.50
Tested by
no test coverage detected