mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-11 23:54:19 +00:00
Add adl_ranges (#413)
Co-authored-by: lsemprini <17140216+lsemprini@users.noreply.github.com>
This commit is contained in:
parent
513e606d7b
commit
d642b05dcb
5 changed files with 174 additions and 14 deletions
|
|
@ -49,17 +49,17 @@ struct magic_enum::customize::enum_range<Color> {
|
|||
static constexpr bool is_flags = true;
|
||||
};
|
||||
|
||||
enum class Numbers : int {
|
||||
none = 0,
|
||||
one = 1 << 1,
|
||||
two = 1 << 2,
|
||||
three = 1 << 3,
|
||||
many = 1 << 30,
|
||||
};
|
||||
template <>
|
||||
struct magic_enum::customize::enum_range<Numbers> {
|
||||
static constexpr bool is_flags = true;
|
||||
};
|
||||
namespace Namespace {
|
||||
enum class Numbers : int {
|
||||
none = 0,
|
||||
one = 1 << 1,
|
||||
two = 1 << 2,
|
||||
three = 1 << 3,
|
||||
many = 1 << 30,
|
||||
};
|
||||
magic_enum::customize::adl_info<true> adl_magic_enum_define_range(Numbers);
|
||||
}
|
||||
using Namespace::Numbers;
|
||||
|
||||
enum Directions : std::uint64_t {
|
||||
NoDirection = 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue