Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
11
template<typename T>
12
constexpr std::underlying_type_t<T> to_underlying(T value)
13
{
14
return static_cast<std::underlying_type_t<T>>(value);
15
}
16
17
enum LogLevel { Info, Warning, Error };
18
Callers
1
format
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected