From 703db3613d4ea2c2930255b9f1a4bd9429eeb03d Mon Sep 17 00:00:00 2001 From: neargye Date: Mon, 11 May 2020 16:25:00 +0500 Subject: [PATCH] update doc --- doc/limitations.md | 28 ++++++++++++++++------------ doc/reference.md | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/doc/limitations.md b/doc/limitations.md index 42b7470..360fb7a 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -38,18 +38,6 @@ } // namespace magic_enum ``` -* If you hit a message like this: - - ```text - [...] - note: constexpr evaluation hit maximum step limit; possible infinite loop? - ``` - - Change the limit for the number of constexpr evaluated: - * MSVC `/constexpr:depthN`, `/constexpr:stepsN` - * Clang `-fconstexpr-depth=N`, `-fconstexpr-steps=N` - * GCC `-fconstexpr-depth=N`, `-fconstexpr-loop-limit=N`, `-fconstexpr-ops-limit=N` - * `magic_enum` won't work if a value is aliased, work with enum-aliases is compiler-implementation-defined. ```cpp @@ -91,3 +79,19 @@ // magic_enum::enum_cast("ConvexBegin") -> std::nullopt // magic_enum::enum_name(ShapeKind::ConvexBegin) -> "Box" ``` + +* If you hit a message like this: + + ```text + [...] + note: constexpr evaluation hit maximum step limit; possible infinite loop? + ``` + + Change the limit for the number of constexpr evaluated: + * MSVC `/constexpr:depthN`, `/constexpr:stepsN` + * Clang `-fconstexpr-depth=N`, `-fconstexpr-steps=N` + * GCC `-fconstexpr-depth=N`, `-fconstexpr-loop-limit=N`, `-fconstexpr-ops-limit=N` + +* Intellisense Visual Studio may have some problems analyzing `magic_enum`. + * [Intellisense hangs forever when using `magic_enum` since 0.6.1 on x86 projects.](https://github.com/Neargye/magic_enum/issues/34) + * [Intellisense incorrect analysis constexpr.](https://github.com/Neargye/magic_enum/issues/26) diff --git a/doc/reference.md b/doc/reference.md index 84150b0..33213b8 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -140,7 +140,7 @@ template constexpr string_view enum_name() noexcept; ``` -* Returns `std::string_view`. +* Returns `std::string_view` with null-terminated string enum name from enum value. * If enum value does not have name or [out of range](limitations.md), `enum_name(value)` returns empty string. * If enum value does not have name, `enum_name()` occurs the compilation error `"Enum value does not have a name."`.