Section: 28.4.9 [cmplx.over] Status: C++11 Submitter: P.J. Plauger Opened: 2010-10-14 Last modified: 2016-01-28 10:19:27 UTC
Priority: Not Prioritized
View all other issues in [cmplx.over].
View all issues with C++11 status.
In Pittsburgh, we accepted the resolution of library issue 1137, to add a sentence 3 to [cmplx.over]:
All the specified overloads shall have a return type which is the nested value_type of the effectively cast arguments.
This was already true for four of the six functions except conj and proj. It is not completely unreasonable to make proj return the real value only, but the IEC specification does call for an imaginary part of -0 in some circumstances. The people who care about these distinctions really care, and it is required by an international standard.
Making conj return just the real part breaks it horribly, however. It is well understood in mathematics that conj(re + i*im) is (re - i*im), and it is widely used. The accepted new definition makes conj useful only for pure real operations. This botch absolutely must be fixed.
[ 2010 Batavia: The working group concurred with the issue's Proposed Resolution ]
[ Adopted at 2010-11 Batavia ]
Remove the recently added paragraph 3 from [cmplx.over]:
3 All the specified overloads shall have a return type which is the nested value_type of the effectively cast arguments.