We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cfd465 commit 4cb1674Copy full SHA for 4cb1674
include/oup/observable_unique_ptr.hpp
@@ -47,15 +47,15 @@ namespace details {
47
Bits <= 32, std::uint_least32_t, std::conditional_t<
48
Bits <= 64, std::uint_least64_t, std::size_t>>>> {};
49
50
- // courtesy of https://stackoverflow.com/a/23782939
+ // Courtesy of https://stackoverflow.com/a/23782939
51
constexpr std::size_t floor_log2(std::size_t x)
52
{
53
- return x == 1 ? 0 : 1+floor_log2(x >> 1);
+ return x == 1 ? 0 : 1 + floor_log2(x >> 1);
54
}
55
56
constexpr std::size_t ceil_log2(std::size_t x)
57
58
- return x == 1 ? 0 : floor_log2(x - 1) + 1;
+ return x == 1 ? 0 : 1 + floor_log2(x - 1);
59
60
61
0 commit comments