From 573bc60011048f4cce5d58cd33b5cae8c80a9397 Mon Sep 17 00:00:00 2001 From: neargye Date: Mon, 6 Jul 2020 19:22:53 +0500 Subject: [PATCH] wip --- doc/limitations.md | 5 ++--- include/magic_enum.hpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/limitations.md b/doc/limitations.md index 20a0301..c682bca 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -38,7 +38,7 @@ } // namespace magic_enum ``` -* `magic_enum` won't work if a value is aliased, work with enum-aliases is compiler-implementation-defined. +* `magic_enum` won't work if a value is aliased. Work with enum-aliases is compiler-implementation-defined. ```cpp enum ShapeKind { @@ -80,8 +80,7 @@ // magic_enum::enum_name(ShapeKind::ConvexBegin) -> "Box" ``` - On some compiler enum-aliases not supported: - * + On some compiler enum-aliases not supported, [for example Visual Studio 2017](https://github.com/Neargye/magic_enum/issues/36). * If you hit a message like this: diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index 5ceeb54..d20520e 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -210,7 +210,7 @@ constexpr std::uint8_t log2(T value) noexcept { return log2(static_cast(value)); } else { auto ret = std::uint8_t{0}; - for (; value > static_cast(1U); value >>= static_cast(1U), ++ret) {}; + for (; value > static_cast(1); value >>= static_cast(1), ++ret) {}; return ret; }