WPILibC++ 2027.0.0-alpha-5
Loading...
Searching...
No Matches
to_underlying.hpp
Go to the documentation of this file.
1// Copyright (c) Sleipnir contributors
2
3#pragma once
4
5#include <type_traits>
6
7namespace slp {
8
9template <typename Enum>
10constexpr std::underlying_type_t<Enum> to_underlying(Enum e) noexcept {
11 return static_cast<std::underlying_type_t<Enum>>(e);
12}
13
14} // namespace slp
Definition to_underlying.hpp:7
constexpr std::underlying_type_t< Enum > to_underlying(Enum e) noexcept
Definition to_underlying.hpp:10