1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-10 23:44:29 +00:00
This commit is contained in:
neargye 2020-07-06 19:22:53 +05:00
parent 13eff83de5
commit 573bc60011
2 changed files with 3 additions and 4 deletions

View file

@ -38,7 +38,7 @@
} // namespace magic_enum } // 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 ```cpp
enum ShapeKind { enum ShapeKind {
@ -80,8 +80,7 @@
// magic_enum::enum_name(ShapeKind::ConvexBegin) -> "Box" // 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).
* <https://github.com/Neargye/magic_enum/issues/36>
* If you hit a message like this: * If you hit a message like this:

View file

@ -210,7 +210,7 @@ constexpr std::uint8_t log2(T value) noexcept {
return log2<U>(static_cast<U>(value)); return log2<U>(static_cast<U>(value));
} else { } else {
auto ret = std::uint8_t{0}; auto ret = std::uint8_t{0};
for (; value > static_cast<T>(1U); value >>= static_cast<T>(1U), ++ret) {}; for (; value > static_cast<T>(1); value >>= static_cast<T>(1), ++ret) {};
return ret; return ret;
} }