Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofCD1 status.

844.complex pow return type is ambiguous

Section: 29.4.10[cmplx.over]Status:CD1Submitter: Howard HinnantOpened: 2008-06-03Last modified: 2016-01-28

Priority:Not Prioritized

View all otherissues in [cmplx.over].

View all issues withCD1 status.

Discussion:

The current working draft is in an inconsistent state.

29.4.8[complex.transcendentals] says that:

pow(complex<float>(), int()) returns acomplex<float>.

29.4.10[cmplx.over] says that:

pow(complex<float>(), int()) returns acomplex<double>.

[Sophia Antipolis:]

Sinceint promotes todouble, and C99 doesn't have anint-basedoverload forpow, the C99 result iscomplex<double>, see also C997.22, see also library issue550(i).

Special note: ask P.J. Plauger.

Looks fine.

Proposed resolution:

Strike thispow overload in 29.4.2[complex.syn] and in 29.4.8[complex.transcendentals]:

template<class T> complex<T> pow(const complex<T>& x, int y);

[8]ページ先頭

©2009-2026 Movatter.jp