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

Function to_underlying

05.32-stdFmtCustomLogger4/main.cpp:15–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13// Part of C++23's STL
14template<typename T>
15constexpr std::underlying_type_t<T> to_underlying(T value)
16{
17 return static_cast<std::underlying_type_t<T>>(value);
18}
19
20enum LogLevel { Info, Warning, Error };
21

Callers 1

formatMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected