ΒΆtemplate <typename T>
typename std::enable_if<std::is_signed<T>::value,
                        llvm::Optional<T>>::type
checkedSub(T LHS, T RHS)

Description

Subtract two signed integers \p LHS and \p RHS.

Declared at: llvm/include/llvm/Support/CheckedArithmetic.h:57

Templates

T

Parameters

T LHS
T RHS

Returns

Optional of sum if no signed overflow occurred,\c None otherwise.