This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
[valarray.unary]
# 29 Numerics library [[numerics]](./#numerics)
## 29.6 Numeric arrays [[numarray]](numarray#valarray.unary)
### 29.6.2 Class template valarray [[template.valarray]](template.valarray#valarray.unary)
#### 29.6.2.6 Unary operators [valarray.unary]
[🔗](#lib:operator+,valarray)
`valarray operator+() const;
valarray operator-() const;
valarray operator~() const;
valarray<bool> operator!() const;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L7813)
*Mandates*: The indicated operator can be applied to operands of type T and returns a value of type T (bool foroperator!) or which may be unambiguously implicitly converted to typeT (bool for operator!)[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L7820)
*Returns*: A valarray whose length is size()[.](#2.sentence-1)
Each element of the returned array is initialized with the result of
applying the indicated operator to the corresponding element of the array[.](#2.sentence-2)