1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-10 23:44:29 +00:00

enum_integer_value -> enum_integer

This commit is contained in:
terik23 2019-04-30 11:42:31 +05:00
parent 39c5ed518d
commit 8f095f8c22
3 changed files with 13 additions and 13 deletions

View file

@ -245,9 +245,9 @@ template <typename E, typename = detail::enable_if_enum_t<E>>
// Returns integer value from enum value.
template <typename E, typename = detail::enable_if_enum_t<E>>
[[nodiscard]] constexpr auto enum_integer_value(E value) noexcept {
[[nodiscard]] constexpr auto enum_integer(E value) noexcept {
using D = std::decay_t<E>;
static_assert(std::is_enum_v<D>, "magic_enum::enum_integer_value requires enum type.");
static_assert(std::is_enum_v<D>, "magic_enum::enum_integer requires enum type.");
return static_cast<std::underlying_type_t<D>>(value);
}