Adds two values and stores the result in the left-hand-side variable, wrapping any overflow.
- Xcode 10.0+
- Swift Standard Library
The first value to add.
The second value to add.
The masking addition assignment operator (
&+=) silently wraps any overflow that occurs during the operation. In the following example, the sum of
121 is greater than the maximum representable
Int8 value, so the result is the partial value after discarding the overflowing bits.