This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
Section: 24.5.9 [cmplx.over] Status: CD1 Submitter: Howard Hinnant Opened: 2008-06-03 Last modified: 2016-12-23
Priority: Not Prioritized
View all other issues in [cmplx.over].
View all issues with CD1 status.
The current working draft is in an inconsistent state.
24.5.8 [complex.transcendentals] says that:
pow(complex<float>(), int()) returns a complex<float>.
24.5.9 [cmplx.over] says that:
pow(complex<float>(), int()) returns a complex<double>.
[ Sophia Antipolis: ]
Since int promotes to double, and C99 doesn't have an int-based overload for pow, the C99 result is complex<double>, see also C99 7.22, see also library issue 550.
Special note: ask P.J. Plauger.
Strike this pow overload in 24.5.1 [complex.syn] and in 24.5.8 [complex.transcendentals]:
template<class T> complex<T> pow(const complex<T>& x, int y);