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

fix namespace

This commit is contained in:
neargye 2025-09-01 01:21:32 +04:00
parent aaf57737d5
commit 083298a045
5 changed files with 9 additions and 9 deletions

View file

@ -23,7 +23,7 @@
* If an enum is declared as a flag enum, its zero value will not be reflected.
* Or, for enum types that are deeply nested in classes and/or namespaces, declare a function called `adl_magic_enum_define_range(my_enum_type)` in the same namespace as `my_enum_type`, which magic_enum will find by ADL (because the function is in the same class/namespace as `my_enum_type`), and whose return type is a `magic_enum::customize::adl_info`.
* Or, for enum types that are deeply nested in classes and/or namespaces, declare a function called `magic_enum_define_range_adl(my_enum_type)` in the same namespace as `my_enum_type`, which magic_enum will find by ADL (because the function is in the same class/namespace as `my_enum_type`), and whose return type is a `magic_enum::customize::adl_info`.
```cpp
namespace Deeply::Nested::Namespace {
@ -32,7 +32,7 @@
// - magic_enum will find this function by ADL
// - uses builder pattern
// - use auto to not have to name the type yourself
auto adl_magic_enum_define_range(my_enum_type)
auto magic_enum_define_range_adl(my_enum_type)
{
return magic_enum::customize::adl_info()
.minmax<10,10>() // the min max search range