Left bit shift with safe minimum and maximum values.
Declared in <util/overflow.h>
template<std::integral T>
constexpr
T
SaturatingLeftShift(
T input,
unsigned int shift) noexcept;
(input * 2^shift) clamped to fit between the lowest and highest representable values of the type T.
| Name | Description |
|---|---|
| input | The input value to be left shifted. |
| shift | The number of bits to left shift. |