tmp/tmp8pr90mt2/{from.md → to.md}
RENAMED
|
@@ -1,25 +1,24 @@
|
|
| 1 |
### Additional overloads <a id="cmplx.over">[[cmplx.over]]</a>
|
| 2 |
|
| 3 |
-
The following function templates
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
arg norm
|
| 7 |
conj proj
|
| 8 |
imag real
|
| 9 |
```
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
The additional overloads shall be sufficient to ensure:
|
| 14 |
|
| 15 |
- If the argument has a floating-point type `T`, then it is effectively
|
| 16 |
cast to `complex<T>`.
|
| 17 |
- Otherwise, if the argument has integer type, then it is effectively
|
| 18 |
cast to `complex<double>`.
|
| 19 |
|
| 20 |
-
Function template `pow` has additional overloads sufficient to
|
| 21 |
-
for a call with one argument of type `complex<T1>` and the other
|
| 22 |
argument of type `T2` or `complex<T2>`, both arguments are effectively
|
| 23 |
-
cast to `complex<common_type_t<T1,
|
| 24 |
-
|
|
|
|
| 25 |
|
|
|
|
| 1 |
### Additional overloads <a id="cmplx.over">[[cmplx.over]]</a>
|
| 2 |
|
| 3 |
+
The following function templates have additional constexpr overloads:
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
arg norm
|
| 7 |
conj proj
|
| 8 |
imag real
|
| 9 |
```
|
| 10 |
|
| 11 |
+
The additional constexpr overloads are sufficient to ensure:
|
|
|
|
|
|
|
| 12 |
|
| 13 |
- If the argument has a floating-point type `T`, then it is effectively
|
| 14 |
cast to `complex<T>`.
|
| 15 |
- Otherwise, if the argument has integer type, then it is effectively
|
| 16 |
cast to `complex<double>`.
|
| 17 |
|
| 18 |
+
Function template `pow` has additional constexpr overloads sufficient to
|
| 19 |
+
ensure, for a call with one argument of type `complex<T1>` and the other
|
| 20 |
argument of type `T2` or `complex<T2>`, both arguments are effectively
|
| 21 |
+
cast to `complex<common_type_t<T1, T3>>`, where `T3` is `double` if `T2`
|
| 22 |
+
is an integer type and `T2` otherwise. If `common_type_t<T1, T3>` is not
|
| 23 |
+
well-formed, then the program is ill-formed.
|
| 24 |
|