MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / to_string

Function to_string

11.10-usingEnum0/main.cpp:13–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11};
12
13constexpr std::string_view to_string(Permission permission)
14{
15 switch(permission) {
16 case Permission::Read: return "Read";
17 case Permission::Write: return "Write";
18 case Permission::Execute: return "Execute";
19 }
20
21 return "unknown";
22}
23
24int main()
25{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected