7#ifndef MAGIC_ENUM_RANGE_MIN
8#define MAGIC_ENUM_RANGE_MIN 0
10#ifndef MAGIC_ENUM_RANGE_MAX
11#define MAGIC_ENUM_RANGE_MAX 255
15#include <magic_enum/magic_enum.hpp>
33constexpr std::string_view
Name(
E value)
noexcept
35 return magic_enum::enum_name(value);
46constexpr std::optional<E>
Parse(std::string_view name)
noexcept
48 return magic_enum::enum_cast<E>(name, magic_enum::case_insensitive);
53inline constexpr std::size_t
EnumCount = magic_enum::enum_count<E>();
59 return magic_enum::enum_index(value).value_or(
EnumCount<E>);
66 return magic_enum::enum_values<E>();
static std::string ReadFile(const std::filesystem::path &path)
constexpr std::size_t EnumIndex(E value) noexcept
constexpr std::size_t EnumCount
constexpr auto EnumValues() noexcept
constexpr std::optional< E > Parse(std::string_view name) noexcept