26 Numerics library [numerics]

26.6 Numeric arrays [numarray]

26.6.2 Class template valarray [template.valarray] valarray unary operators [valarray.unary]

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

Each of these operators may only be instantiated for a type T to which the indicated operator can be applied and for which the indicated operator returns a value which is of type T (bool for operator!) or which may be unambiguously implicitly converted to type T (bool for operator!).

Each of these operators returns an array whose length is equal to the length of the array. Each element of the returned array is initialized with the result of applying the indicated operator to the corresponding element of the array.