[valarray.unary] (original) (raw)

29 Numerics library [numerics]

29.6 Numeric arrays [numarray]

29.6.2 Class template valarray [template.valarray]

29.6.2.6 Unary operators [valarray.unary]

valarray operator+() const; valarray operator-() const; valarray operator~() const; valarray<bool> operator!() const;

Mandates: The indicated operator can be applied to operands of type Tand returns a value of type T (bool foroperator!) or which may be unambiguously implicitly converted to typeT (bool for operator!).

Returns: A valarray whose length is size().

Each element of the returned array is initialized with the result of applying the indicated operator to the corresponding element of the array.