From 84990c60b2589421c39b69b18039ae6cbaa43f73 Mon Sep 17 00:00:00 2001 From: neargye Date: Tue, 19 Nov 2024 23:47:49 +0200 Subject: [PATCH] update doc --- README.md | 2 ++ doc/limitations.md | 4 ++-- doc/reference.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0bdc2fc61..678f8d392 100644 --- a/README.md +++ b/README.md @@ -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 + //.... Color color = Color::RED; auto color_name = magic_enum::enum_name(color); // color_name -> "RED" diff --git a/doc/limitations.md b/doc/limitations.md index 506e6dcdb..7b57ef1fe 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -34,13 +34,13 @@ ```cpp #define MAGIC_ENUM_RANGE_MIN 0 #define MAGIC_ENUM_RANGE_MAX 256 - #include + #include ``` * 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 + #include enum class number { one = 100, two = 200, three = 300 }; diff --git a/doc/reference.md b/doc/reference.md index 841b1506f..a81bb3bda 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -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 using optional = my_lib::Optional; - #include + #include ``` * Optionally define `MAGIC_ENUM_CONFIG_FILE` i.e., in your build system, with path to header file with defined