26 Numerics library [numerics]

26.6 Numeric arrays [numarray]

26.6.2 Class template valarray [template.valarray]

26.6.2.7 valarray computed assignment [valarray.cassign]

valarray<T>& operator*= (const valarray<T>&); valarray<T>& operator/= (const valarray<T>&); valarray<T>& operator%= (const valarray<T>&); valarray<T>& operator+= (const valarray<T>&); valarray<T>& operator-= (const valarray<T>&); valarray<T>& operator^= (const valarray<T>&); valarray<T>& operator&= (const valarray<T>&); valarray<T>& operator|= (const valarray<T>&); valarray<T>& operator<<=(const valarray<T>&); valarray<T>& operator>>=(const valarray<T>&);

Each of these operators may only be instantiated for a type T to which the indicated operator can be applied. Each of these operators performs the indicated operation on each of its elements and the corresponding element of the argument array.

The array is then returned by reference.

If the array and the argument array do not have the same length, the behavior is undefined. The appearance of an array on the left-hand side of a computed assignment does not invalidate references or pointers.

If the value of an element in the left-hand side of a valarray computed assignment operator depends on the value of another element in that left hand side, the resulting behavior is undefined.

valarray<T>& operator*= (const T&); valarray<T>& operator/= (const T&); valarray<T>& operator%= (const T&); valarray<T>& operator+= (const T&); valarray<T>& operator-= (const T&); valarray<T>& operator^= (const T&); valarray<T>& operator&= (const T&); valarray<T>& operator|= (const T&); valarray<T>& operator<<=(const T&); valarray<T>& operator>>=(const T&);

Each of these operators may only be instantiated for a type T to which the indicated operator can be applied.

Each of these operators applies the indicated operation to each element of the array and the non-array argument.

The array is then returned by reference.

The appearance of an array on the left-hand side of a computed assignment does not invalidate references or pointers to the elements of the array.