Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Neargye committed Nov 19, 2024
1 parent 715b442 commit 84990c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ If you like this project, please consider donating to one of the funds that help
* Enum value to string

```cpp
#include <magic_enum/magic_enum.hpp>
//....
Color color = Color::RED;
auto color_name = magic_enum::enum_name(color);
// color_name -> "RED"
Expand Down
4 changes: 2 additions & 2 deletions doc/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
```cpp
#define MAGIC_ENUM_RANGE_MIN 0
#define MAGIC_ENUM_RANGE_MAX 256
#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
```
* If you need a different range for a specific enum type, add the specialization `enum_range` for the enum type. Specializations of `enum_range` must be injected in `namespace magic_enum::customize`.
```cpp
#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
enum class number { one = 100, two = 200, three = 300 };
Expand Down
2 changes: 1 addition & 1 deletion doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#define MAGIC_ENUM_USING_ALIAS_STRING using string = my_lib::String;
#define MAGIC_ENUM_USING_ALIAS_STRING_VIEW using string_view = my_lib::StringView;
#define MAGIC_ENUM_USING_ALIAS_OPTIONAL template <typename T> using optional = my_lib::Optional<T>;
#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
```
* Optionally define `MAGIC_ENUM_CONFIG_FILE` i.e., in your build system, with path to header file with defined
Expand Down

0 comments on commit 84990c6

Please sign in to comment.