Relates :
|
|
Relates :
|
|
Relates :
|
The current definition of left_n_bits is #define left_n_bits(n) \ (right_n_bits(n) << (((n) >= BitsPerWord) ? 0 : (BitsPerWord - (n)))) When n == 0, this reduces to (right_n_bits(0) << BitsPerWord) According to C++03 5.8/2, the behavior of a shift expression is undefined if the right operand is greater than or equal to the length in bits of the promoted left operand. So a shift by BitsPerWord invokes undefined behavior.
|