tmp/tmpx9g88y5e/{from.md → to.md}
RENAMED
|
@@ -23,22 +23,20 @@ template<class T> valarray<T> operator<<
|
|
| 23 |
(const valarray<T>&, const valarray<T>&);
|
| 24 |
template<class T> valarray<T> operator>>
|
| 25 |
(const valarray<T>&, const valarray<T>&);
|
| 26 |
```
|
| 27 |
|
| 28 |
-
Each of these operators may only be instantiated for a type
|
| 29 |
-
the indicated operator can be applied and for which the
|
| 30 |
-
operator returns a value which is of type `T` or which can be
|
| 31 |
-
unambiguously implicitly converted to type `T`.
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
If the argument arrays do not have the same length, the behavior is
|
| 39 |
-
undefined.
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
template<class T> valarray<T> operator* (const valarray<T>&, const T&);
|
| 43 |
template<class T> valarray<T> operator* (const T&, const valarray<T>&);
|
| 44 |
template<class T> valarray<T> operator/ (const valarray<T>&, const T&);
|
|
@@ -59,19 +57,19 @@ template<class T> valarray<T> operator<<(const valarray<T>&, const T&);
|
|
| 59 |
template<class T> valarray<T> operator<<(const T&, const valarray<T>&);
|
| 60 |
template<class T> valarray<T> operator>>(const valarray<T>&, const T&);
|
| 61 |
template<class T> valarray<T> operator>>(const T&, const valarray<T>&);
|
| 62 |
```
|
| 63 |
|
| 64 |
-
Each of these operators may only be instantiated for a type
|
| 65 |
-
the indicated operator can be applied and for which the
|
| 66 |
-
operator returns a value which is of type `T` or which can be
|
| 67 |
unambiguously implicitly converted to type `T`.
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
|
| 74 |
#### `valarray` logical operators <a id="valarray.comparison">[[valarray.comparison]]</a>
|
| 75 |
|
| 76 |
``` cpp
|
| 77 |
template<class T> valarray<bool> operator==
|
|
@@ -90,22 +88,20 @@ template<class T> valarray<bool> operator&&
|
|
| 90 |
(const valarray<T>&, const valarray<T>&);
|
| 91 |
template<class T> valarray<bool> operator||
|
| 92 |
(const valarray<T>&, const valarray<T>&);
|
| 93 |
```
|
| 94 |
|
| 95 |
-
Each of these operators may only be instantiated for a type
|
| 96 |
-
the indicated operator can be applied and for which the
|
| 97 |
-
operator returns a value which is of type `bool` or which can
|
| 98 |
-
unambiguously implicitly converted to type `bool`.
|
|
|
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
If the two array arguments do not have the same length, the behavior is
|
| 106 |
-
undefined.
|
| 107 |
|
| 108 |
``` cpp
|
| 109 |
template<class T> valarray<bool> operator==(const valarray<T>&, const T&);
|
| 110 |
template<class T> valarray<bool> operator==(const T&, const valarray<T>&);
|
| 111 |
template<class T> valarray<bool> operator!=(const valarray<T>&, const T&);
|
|
@@ -122,19 +118,19 @@ template<class T> valarray<bool> operator&&(const valarray<T>&, const T&);
|
|
| 122 |
template<class T> valarray<bool> operator&&(const T&, const valarray<T>&);
|
| 123 |
template<class T> valarray<bool> operator||(const valarray<T>&, const T&);
|
| 124 |
template<class T> valarray<bool> operator||(const T&, const valarray<T>&);
|
| 125 |
```
|
| 126 |
|
| 127 |
-
Each of these operators may only be instantiated for a type
|
| 128 |
-
the indicated operator can be applied and for which the
|
| 129 |
-
operator returns a value which is of type `bool` or which can
|
| 130 |
-
unambiguously implicitly converted to type `bool`.
|
| 131 |
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
|
| 137 |
#### `valarray` transcendentals <a id="valarray.transcend">[[valarray.transcend]]</a>
|
| 138 |
|
| 139 |
``` cpp
|
| 140 |
template<class T> valarray<T> abs (const valarray<T>&);
|
|
@@ -159,18 +155,18 @@ template<class T> valarray<T> sinh (const valarray<T>&);
|
|
| 159 |
template<class T> valarray<T> sqrt (const valarray<T>&);
|
| 160 |
template<class T> valarray<T> tan (const valarray<T>&);
|
| 161 |
template<class T> valarray<T> tanh (const valarray<T>&);
|
| 162 |
```
|
| 163 |
|
| 164 |
-
Each of these functions may only be instantiated for a type
|
| 165 |
-
a unique function with the indicated name can be applied
|
| 166 |
-
This function shall return a value which is of type `T`
|
| 167 |
-
unambiguously implicitly converted to type `T`.
|
| 168 |
|
| 169 |
#### `valarray` specialized algorithms <a id="valarray.special">[[valarray.special]]</a>
|
| 170 |
|
| 171 |
``` cpp
|
| 172 |
template <class T> void swap(valarray<T>& x, valarray<T>& y) noexcept;
|
| 173 |
```
|
| 174 |
|
| 175 |
-
*Effects:* `x.swap(y)`.
|
| 176 |
|
|
|
|
| 23 |
(const valarray<T>&, const valarray<T>&);
|
| 24 |
template<class T> valarray<T> operator>>
|
| 25 |
(const valarray<T>&, const valarray<T>&);
|
| 26 |
```
|
| 27 |
|
| 28 |
+
*Requires:* Each of these operators may only be instantiated for a type
|
| 29 |
+
`T` to which the indicated operator can be applied and for which the
|
| 30 |
+
indicated operator returns a value which is of type `T` or which can be
|
| 31 |
+
unambiguously implicitly converted to type `T`. The argument arrays have
|
| 32 |
+
the same length.
|
| 33 |
|
| 34 |
+
*Returns:* A `valarray` whose length is equal to the lengths of the
|
| 35 |
+
argument arrays. Each element of the returned array is initialized with
|
| 36 |
+
the result of applying the indicated operator to the corresponding
|
| 37 |
+
elements of the argument arrays.
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template<class T> valarray<T> operator* (const valarray<T>&, const T&);
|
| 41 |
template<class T> valarray<T> operator* (const T&, const valarray<T>&);
|
| 42 |
template<class T> valarray<T> operator/ (const valarray<T>&, const T&);
|
|
|
|
| 57 |
template<class T> valarray<T> operator<<(const T&, const valarray<T>&);
|
| 58 |
template<class T> valarray<T> operator>>(const valarray<T>&, const T&);
|
| 59 |
template<class T> valarray<T> operator>>(const T&, const valarray<T>&);
|
| 60 |
```
|
| 61 |
|
| 62 |
+
*Requires:* Each of these operators may only be instantiated for a type
|
| 63 |
+
`T` to which the indicated operator can be applied and for which the
|
| 64 |
+
indicated operator returns a value which is of type `T` or which can be
|
| 65 |
unambiguously implicitly converted to type `T`.
|
| 66 |
|
| 67 |
+
*Returns:* A `valarray` whose length is equal to the length of the array
|
| 68 |
+
argument. Each element of the returned array is initialized with the
|
| 69 |
+
result of applying the indicated operator to the corresponding element
|
| 70 |
+
of the array argument and the non-array argument.
|
| 71 |
|
| 72 |
#### `valarray` logical operators <a id="valarray.comparison">[[valarray.comparison]]</a>
|
| 73 |
|
| 74 |
``` cpp
|
| 75 |
template<class T> valarray<bool> operator==
|
|
|
|
| 88 |
(const valarray<T>&, const valarray<T>&);
|
| 89 |
template<class T> valarray<bool> operator||
|
| 90 |
(const valarray<T>&, const valarray<T>&);
|
| 91 |
```
|
| 92 |
|
| 93 |
+
*Requires:* Each of these operators may only be instantiated for a type
|
| 94 |
+
`T` to which the indicated operator can be applied and for which the
|
| 95 |
+
indicated operator returns a value which is of type `bool` or which can
|
| 96 |
+
be unambiguously implicitly converted to type `bool`. The two array
|
| 97 |
+
arguments have the same length.
|
| 98 |
|
| 99 |
+
*Returns:* A `valarray<bool>` whose length is equal to the length of the
|
| 100 |
+
array arguments. Each element of the returned array is initialized with
|
| 101 |
+
the result of applying the indicated operator to the corresponding
|
| 102 |
+
elements of the argument arrays.
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
``` cpp
|
| 105 |
template<class T> valarray<bool> operator==(const valarray<T>&, const T&);
|
| 106 |
template<class T> valarray<bool> operator==(const T&, const valarray<T>&);
|
| 107 |
template<class T> valarray<bool> operator!=(const valarray<T>&, const T&);
|
|
|
|
| 118 |
template<class T> valarray<bool> operator&&(const T&, const valarray<T>&);
|
| 119 |
template<class T> valarray<bool> operator||(const valarray<T>&, const T&);
|
| 120 |
template<class T> valarray<bool> operator||(const T&, const valarray<T>&);
|
| 121 |
```
|
| 122 |
|
| 123 |
+
*Requires:* Each of these operators may only be instantiated for a type
|
| 124 |
+
`T` to which the indicated operator can be applied and for which the
|
| 125 |
+
indicated operator returns a value which is of type `bool` or which can
|
| 126 |
+
be unambiguously implicitly converted to type `bool`.
|
| 127 |
|
| 128 |
+
*Returns:* A `valarray<bool>` whose length is equal to the length of the
|
| 129 |
+
array argument. Each element of the returned array is initialized with
|
| 130 |
+
the result of applying the indicated operator to the corresponding
|
| 131 |
+
element of the array and the non-array argument.
|
| 132 |
|
| 133 |
#### `valarray` transcendentals <a id="valarray.transcend">[[valarray.transcend]]</a>
|
| 134 |
|
| 135 |
``` cpp
|
| 136 |
template<class T> valarray<T> abs (const valarray<T>&);
|
|
|
|
| 155 |
template<class T> valarray<T> sqrt (const valarray<T>&);
|
| 156 |
template<class T> valarray<T> tan (const valarray<T>&);
|
| 157 |
template<class T> valarray<T> tanh (const valarray<T>&);
|
| 158 |
```
|
| 159 |
|
| 160 |
+
*Requires:* Each of these functions may only be instantiated for a type
|
| 161 |
+
`T` to which a unique function with the indicated name can be applied
|
| 162 |
+
(unqualified). This function shall return a value which is of type `T`
|
| 163 |
+
or which can be unambiguously implicitly converted to type `T`.
|
| 164 |
|
| 165 |
#### `valarray` specialized algorithms <a id="valarray.special">[[valarray.special]]</a>
|
| 166 |
|
| 167 |
``` cpp
|
| 168 |
template <class T> void swap(valarray<T>& x, valarray<T>& y) noexcept;
|
| 169 |
```
|
| 170 |
|
| 171 |
+
*Effects:* Equivalent to `x.swap(y)`.
|
| 172 |
|