OGS
cpp23.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <type_traits>
14
15// ToDo (tm) remove with c++23
16
17namespace BaseLib
18{
28template <typename E>
29constexpr auto to_underlying(E e) noexcept
30{
31 return static_cast<std::underlying_type_t<E>>(e);
32}
33} // namespace BaseLib
constexpr auto to_underlying(E e) noexcept
Converts an enumeration to its underlying type.
Definition cpp23.h:29