22 General utilities library [utilities]

22.11 Bit manipulation [bit]

22.11.6 Shifting [bit.shift]

Within this subclause, the result r of an arithmetic operation is first represented in a hypothetical integer type with sufficient range, then converted to T as if by static_cast<T>(r).
template<class T, class S> constexpr T shl(T x, S s) noexcept;
Constraints: Each of T and S is a signed or unsigned integer type ([basic.fundamental]).
Returns: rounded towards negative infinity.
template<class T, class S> constexpr T shr(T x, S s) noexcept;
Constraints: Each of T and S is a signed or unsigned integer type ([basic.fundamental]).
Returns: rounded towards negative infinity.