The C++ standard stipulates that when the right operand of the displacement is equal to the number of bits of the left operand, the operation will lead to undefined behavior.
5.8.1 The operands shall be of integral or unscoped enumeration type and integral promotions are performed. The type of the result is that of the promoted left operand. The behavior is undefined if the right operand is negative, or greater than or equal to the length in bits of the promoted left operand.
The C++ standard stipulates that when the right operand of the displacement is equal to the number of bits of the left operand, the operation will lead to undefined behavior.