protocol _IntegerArithmeticType
Inheritance | View Protocol Hierarchy → |
---|---|
Import | import Swift |
Static Methods
Adds lhs
and rhs
, returning the result and a Bool
that is
true
iff the operation caused an arithmetic overflow.
Declaration
static func addWithOverflow(lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
Divides lhs
and rhs
, returning the result and a Bool
that is
true
iff the operation caused an arithmetic overflow.
Declaration
static func divideWithOverflow(lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
Multiplies lhs
and rhs
, returning the result and a Bool
that is
true
iff the operation caused an arithmetic overflow.
Declaration
static func multiplyWithOverflow(lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
Divides lhs
and rhs
, returning the remainder and a Bool
that is
true
iff the operation caused an arithmetic overflow.
Declaration
static func remainderWithOverflow(lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
Subtracts lhs
and rhs
, returning the result and a Bool
that is
true
iff the operation caused an arithmetic overflow.
Declaration
static func subtractWithOverflow(lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
This protocol is an implementation detail of
IntegerArithmeticType
; do not use it directly.Its requirements are inherited by
IntegerArithmeticType
and thus must be satisfied by types conforming to that protocol.