File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,20 @@ using enum19::meta_enum_for;
1313namespace details {
1414
1515template <size_t maxBit> constexpr auto storageTypeForMaxBit () {
16- if constexpr (maxBit <= sizeof (uint8_t )) {
16+ if constexpr (maxBit <= 8 * sizeof (uint8_t )) {
1717 return uint8_t {};
1818 }
19- else if constexpr (maxBit <= sizeof (uint16_t )) {
19+ else if constexpr (maxBit <= 8 * sizeof (uint16_t )) {
2020 return uint16_t {};
2121 }
22- else if constexpr (maxBit <= sizeof (uint32_t )) {
22+ else if constexpr (maxBit <= 8 * sizeof (uint32_t )) {
2323 return uint32_t {};
2424 }
25- else if constexpr (maxBit <= sizeof (uint64_t )) {
25+ else if constexpr (maxBit <= 8 * sizeof (uint64_t )) {
2626 return uint64_t {};
2727 }
2828 else {
29- static_assert (maxBit > sizeof (uint64_t ), " not supported right now" );
29+ static_assert (maxBit > 8 * sizeof (uint64_t ), " not supported right now" );
3030 }
3131}
3232
You can’t perform that action at this time.
0 commit comments