[PATCH] D78944: [libc++][test] Disable test for extension that's unsupportable in C++20

Casey Carter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 27 10:11:54 PDT 2020


CaseyCarter created this revision.
CaseyCarter added reviewers: ldionne, EricWF, mclow.lists.
Herald added subscribers: libcxx-commits, broadwaylamb, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78944

Files:
  libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
  libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp


Index: libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
===================================================================
--- libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
+++ libcxx/test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
@@ -21,12 +21,13 @@
     std::multimap<int, X> m;
     std::multimap<int, X>::iterator i;
     std::multimap<int, X>::const_iterator ci;
+#if TEST_STD_VER <= 17
     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;
+    return 0;
 }
Index: libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
===================================================================
--- libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
+++ libcxx/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
@@ -21,12 +21,13 @@
     std::map<int, X> m;
     std::map<int, X>::iterator i;
     std::map<int, X>::const_iterator ci;
+#if TEST_STD_VER <= 17
     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;
+    return 0;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78944.260348.patch
Type: text/x-patch
Size: 1367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200427/58f69fdf/attachment.bin>


More information about the cfe-commits mailing list