20#if defined(__cpp_lib_to_underlying) && (__cpp_lib_to_underlying >= 202102L)
21template <
typename ... Args>
23{
return std::to_underlying(std::forward<Args>(args)...); }
26[[nodiscard]]
constexpr std::underlying_type_t<T>
28{
return static_cast<std::underlying_type_t<T>
>(value); }
constexpr std::underlying_type_t< T > to_underlying(T value) noexcept