This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
We implemented DR 1137 which changed the return types of proj and conj
on scalars, but then before the final C++11 standard DR 1522 reverted
that change, and we never implemented it. That means since GCC 4.5.0
we've been shipping non-conforming proj and conj functions.
This fixes the return types to match the standard, and adds some
missing constexpr on the real and imag overloads for scalars.
Since we're reverting the change from DR 1137 there's no reason to
name the test after that DR, so I'm moving it back to its original
name.
I'm also changing a test's { target c++14 } to c++11. It was
originally written to test std::complex in C++14 mode when the default
was gnu++98, so needed an explicit -std=gnu++14. Now that is the
default and so isn't needed, but there's no reason the test can't also
be used in C++11 mode.
PR libstdc++/61791
PR libstdc++/70607
* include/std/complex (real(T), imag(T)): Add _GLIBCXX_CONSTEXPR.
(proj(T), conj(T)): Change return types per DR 1522.
* include/tr1/complex (conj): Remove overloads and use std::conj.
* testsuite/26_numerics/complex/dr781_dr1137.cc: Rename to...
* testsuite/26_numerics/complex/dr781.cc: ... this, and update.
* testsuite/26_numerics/complex/value_operations/constexpr2.cc: Test
real(T) and imag(T). Allow testing for C++11 too.
Tested powerpc64le-linux, committed to trunk.
Attachment:
patch.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |