We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85a6aca commit c045763Copy full SHA for c045763
1 file changed
include/bitcoin/system/impl/math/bits.ipp
@@ -294,8 +294,8 @@ template <typename Value, if_unsigned_integral_integer<Value>>
294
constexpr void shift_left_into(Value& value, size_t shift, bool overflow) NOEXCEPT
295
{
296
constexpr auto span = bits<Value>;
297
- overflow && shift >= span ? value = 0 :
298
- value <<= (shift % span);
+ overflow && shift >= span ? value = 0 : depromote<Value>(
+ value <<= (shift % span));
299
}
300
301
// signed overloads (shift left of negative is undefined behavior).
0 commit comments