Skip to content

Commit c6fe6a8

Browse files
burblebeetkoeppe
authored andcommitted
LWG4191 P1467 changed the return type of pow(complex<float>, int)
1 parent 35afb0e commit c6fe6a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/numerics.tex

+4-2
Original file line numberDiff line numberDiff line change
@@ -1201,8 +1201,10 @@
12011201
Function template \tcode{pow} has additional constexpr overloads sufficient to ensure,
12021202
for a call with one argument of type \tcode{complex<T1>} and
12031203
the other argument of type \tcode{T2} or \tcode{complex<T2>},
1204-
both arguments are effectively cast to \tcode{complex<common_type_t<T1, T2>>}.
1205-
If \tcode{common_type_t<T1, T2>} is not well-formed,
1204+
both arguments are effectively cast to \tcode{complex<common_type_t<T1, T3>>},
1205+
where \tcode{T3} is
1206+
\tcode{double} if \tcode{T2} is an integer type and \tcode{T2} otherwise.
1207+
If \tcode{common_type_t<T1, T3>} is not well-formed,
12061208
then the program is ill-formed.
12071209

12081210
\rSec2[complex.literals]{Suffixes for complex number literals}

0 commit comments

Comments
 (0)