summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc')
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc7
1 files changed, 4 insertions, 3 deletions
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()
{