Namespaces
Variants
Actions

std::to_underlying

From cppreference.com
< cpp‎ | utility
 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)  
(C++20)
Swap and type operations
(C++14)
(C++11)
to_underlying
(C++23)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)


 
Defined in header <utility>
template< class Enum >
constexpr std::underlying_type_t<Enum> to_underlying( Enum e ) noexcept;
(since C++23)

Converts an enumeration to its underlying type. Equivalent to return static_cast<