diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-04-22 22:54:35 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-04-22 22:54:35 +0100 |
commit | e851aa1703c3d911720d8f9bee68a521abe588f7 (patch) | |
tree | ca8a93040ac4990df88400f9debd850b4ed2bec4 /libstdc++-v3/ChangeLog | |
parent | 2025db692e9ed1192f831bc122413a226987515c (diff) | |
download | gcc-e851aa1703c3d911720d8f9bee68a521abe588f7.zip gcc-e851aa1703c3d911720d8f9bee68a521abe588f7.tar.gz gcc-e851aa1703c3d911720d8f9bee68a521abe588f7.tar.bz2 |
libstdc++: Update (and revert) value of __cpp_lib_array_constexpr
This macro should have been updated to 201811 when the last C++20
changes were implemented. However those changes are not enabled for
C++17 mode, so the macro should only have the new value in C++20 mode.
This change ensures that the macro is defined to 201603 for C++17 and
201811 for C++20.
* include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
different values for C++17 and C++20, to indicate different feature
sets. Update value for C++20 to indicate P1032R1 support.
* include/std/version (__cpp_lib_array_constexpr): Likewise.
* testsuite/23_containers/array/comparison_operators/constexpr.cc:
Check feature test macro.
* testsuite/23_containers/array/element_access/constexpr_c++17.cc:
New test.
* testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
feature test macro.
* testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
in C++17 mode and check feature test macro.
Diffstat (limited to 'libstdc++-v3/ChangeLog')
-rw-r--r-- | libstdc++-v3/ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4fec7b2..cce2549 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,18 @@ 2020-04-22 Jonathan Wakely <jwakely@redhat.com> + * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define + different values for C++17 and C++20, to indicate different feature + sets. Update value for C++20 to indicate P1032R1 support. + * include/std/version (__cpp_lib_array_constexpr): Likewise. + * testsuite/23_containers/array/comparison_operators/constexpr.cc: + Check feature test macro. + * testsuite/23_containers/array/element_access/constexpr_c++17.cc: + New test. + * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check + feature test macro. + * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test + in C++17 mode and check feature test macro. + * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define here. * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be |