llvm::checkedMulUnsigned

Multiply two unsigned integers LHS and RHS.

Synopsis

Declared in <llvm/Support/CheckedArithmetic.h>

template<typename T>
std::optional<T>
checkedMulUnsigned(
    T LHS,
    T RHS)
requires std::is_unsigned_v<T>;

Return Value

Optional of product if no unsigned overflow occurred, std::nullopt otherwise.

Parameters

NameDescription
LHSLeft-hand operand of the product.
RHSRight-hand operand of the product.