This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++11 status.
conj specification is now nonsenseSection: 29.4.10[cmplx.over]Status:C++11Submitter: P.J. PlaugerOpened: 2010-10-14Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [cmplx.over].
View all issues withC++11 status.
Discussion:
In Pittsburgh, we accepted the resolution of library issue1137(i), to adda sentence 3 to [cmplx.over]:
All the specified overloads shall have a return type which is the nested
value_typeof the effectively cast arguments.
This was already true for four of the six functions exceptconj andproj. It is not completely unreasonable to makeproj returnthe real value only, but the IEC specification does call for an imaginary partof -0 in some circumstances. The people who care about these distinctions reallycare, and itis required by an international standard.
Makingconj return just the real part breaks it horribly, however. It iswell understood in mathematics thatconj(re + i*im) is(re - i*im),and it is widely used. The accepted new definition makesconj useful onlyfor pure real operations. This botchabsolutely must be fixed.
[2010 Batavia: The working group concurred with the issue's Proposed Resolution]
[Adopted at 2010-11 Batavia]
Proposed resolution:
Remove the recently added paragraph 3 from [cmplx.over]:
3 All the specified overloads shall have a return type which is the nestedvalue_typeof the effectively cast arguments.