Files
cppdraft_translate/cppdraft/valarray/cassign.md
2025-10-25 03:02:53 +03:00

3.2 KiB

[valarray.cassign]

29 Numerics library [numerics]

29.6 Numeric arrays [numarray]

29.6.2 Class template valarray [template.valarray]

29.6.2.7 Compound assignment [valarray.cassign]

🔗

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

1

#

Mandates: The indicated operator can be applied to two operands of type T.

2

#

Preconditions: size() == v.size() is true.

The value of an element in the left-hand side of a valarray compound assignment operator does not depend on the value of another element in that left hand side.

3

#

Effects: Each of these operators performs the indicated operation on each of the elements of *this and the corresponding element of v.

4

#

Returns: *this.

5

#

Remarks: The appearance of an array on the left-hand side of a compound assignment does not invalidate references or pointers.

🔗

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

6

#

Mandates: The indicated operator can be applied to two operands of type T.

7

#

Effects: Each of these operators applies the indicated operation to each element of *this and v.

8

#

Returns: *this.

9

#

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