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.
c++标准约定当位移右侧操作数等于左侧操作数的位的个数时,运算会导致未定义行为。