[libcxx-commits] [libcxx] b443799 - [libc++][test] Disable test for extension that's unsupportable in C++20
Casey Carter via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 27 13:07:04 PDT 2020
Author: Casey Carter
Date: 2020-04-27T13:06:31-07:00
New Revision: b4437992ecceb3a30429b4c4901e2eeecf8e683a
URL: https://github.com/llvm/llvm-project/commit/b4437992ecceb3a30429b4c4901e2eeecf8e683a
DIFF: https://github.com/llvm/llvm-project/commit/b4437992ecceb3a30429b4c4901e2eeecf8e683a.diff
LOG: [libc++][test] Disable test for extension that's unsupportable in C++20
Defining the nested types `reference` and `iterator_concept` of `reverse_iterator<I>` necessarily requires `I` to be complete in C++20. These tests that verify that `std::map<int, X>::reverse_iterator` can be instantiated when `X` is incomplete are going to have a bad time.
Differential Revision: https://reviews.llvm.org/D78944
Added:
Modified:
libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
index 610ca109ef5a..8b95aefc5514 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
@@ -21,12 +21,11 @@ struct X
std::map<int, X> m;
std::map<int, X>::iterator i;
std::map<int, X>::const_iterator ci;
+#if TEST_STD_VER <= 17
+ // These reverse_iterator specializations require X to be complete in C++20.
std::map<int, X>::reverse_iterator ri;
std::map<int, X>::const_reverse_iterator cri;
+#endif // TEST_STD_VER <= 17
};
-int main(int, char**)
-{
-
- return 0;
-}
+int main(int, char**) { return 0; }
diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
index e468ebf023b1..94003f350eba 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
@@ -21,12 +21,11 @@ struct X
std::multimap<int, X> m;
std::multimap<int, X>::iterator i;
std::multimap<int, X>::const_iterator ci;
+#if TEST_STD_VER <= 17
+ // These reverse_iterator specializations require X to be complete in C++20.
std::multimap<int, X>::reverse_iterator ri;
std::multimap<int, X>::const_reverse_iterator cri;
+#endif // TEST_STD_VER <= 17
};
-int main(int, char**)
-{
-
- return 0;
-}
+int main(int, char**) { return 0; }
More information about the libcxx-commits
mailing list