[#CheckedLeftShift] = CheckedLeftShift :mrdocs: Left bit shift with overflow checking. == Synopsis Declared in `<util/overflow.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<std::integral T> constexpr std::optional<T> CheckedLeftShift( T input, unsigned int shift) noexcept; ---- == Return Value (input * 2ˆshift) or nullopt if it would not fit in the return type. == Parameters [cols="1,4"] |=== | Name| Description | *input* | The input value to be left shifted. | *shift* | The number of bits to left shift. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#