mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
wip
This commit is contained in:
parent
13eff83de5
commit
573bc60011
2 changed files with 3 additions and 4 deletions
|
|
@ -210,7 +210,7 @@ constexpr std::uint8_t log2(T value) noexcept {
|
|||
return log2<U>(static_cast<U>(value));
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue