diff options
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_c++17.cc | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_c++17.cc b/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_c++17.cc index 56d1cf256be..dd69645833f 100644 --- a/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_c++17.cc +++ b/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_c++17.cc @@ -24,8 +24,6 @@ # error "Feature test macro for array constexpr is missing in <array>" #elif __cpp_lib_array_constexpr < 201603L # error "Feature test macro for array constexpr has wrong value in <array>" -#elif __cpp_lib_array_constexpr > 201603L && __cplusplus == 201703 -# error "Feature test macro for array constexpr has wrong value for C++17" #endif constexpr std::size_t test01() diff --git a/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc b/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc index a119937f773..566388405b6 100644 --- a/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc +++ b/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc @@ -22,12 +22,13 @@ #ifndef __cpp_lib_array_constexpr # error "Feature test macro for array constexpr is missing in <array>" -#elif __cpp_lib_array_constexpr < 201603L +#elif __cpp_lib_array_constexpr < 201803L # error "Feature test macro for array constexpr has wrong value in <array>" -#elif __cpp_lib_array_constexpr > 201603L && __cplusplus == 201703 -# error "Feature test macro for array constexpr has wrong value for C++17" #endif +// This test is compiled as C++17 because array::iterator is just a pointer, +// so always meets the C++20 constexpr iterator requirements, even in C++17. + constexpr int test() { |