Returns the product of this value and the given value without checking for arithmetic overflow.
- Xcode 9.0–10.1Deprecated
- Swift Standard Library
The value to multiply by this value.
The product of this value and
Use this function only to avoid the cost of overflow checking when you are certain that the operation won’t overflow. In optimized builds (
-O) the compiler is free to assume that overflow won’t occur. Failure to satisfy that assumption is a serious programming error and could lead to statements being unexpectedly executed or skipped.
In debug builds (
-Onone) a runtime error is still triggered if the operation overflows.
This method is not a synonym for the masking multiplication operator (
&*). Use that operator instead of this method when you want to discard any overflow that results from an addition operation.