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

Function to_underlying

05.27-stdFmtCustomLogger1/main.cpp:12–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

formatMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected