From: Casey Carter Date: Mon, 27 Apr 2020 16:55:00 +0000 (-0700) Subject: [libc++][test] Disable test for extension that's unsupportable in C++20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4437992ecceb3a30429b4c4901e2eeecf8e683a;p=platform%2Fupstream%2Fllvm.git [libc++][test] Disable test for extension that's unsupportable in C++20 Defining the nested types `reference` and `iterator_concept` of `reverse_iterator` necessarily requires `I` to be complete in C++20. These tests that verify that `std::map::reverse_iterator` can be instantiated when `X` is incomplete are going to have a bad time. Differential Revision: https://reviews.llvm.org/D78944 --- 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 610ca10..8b95aef 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 m; std::map::iterator i; std::map::const_iterator ci; +#if TEST_STD_VER <= 17 + // These reverse_iterator specializations require X to be complete in C++20. std::map::reverse_iterator ri; std::map::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 e468ebf..94003f3 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 m; std::multimap::iterator i; std::multimap::const_iterator ci; +#if TEST_STD_VER <= 17 + // These reverse_iterator specializations require X to be complete in C++20. std::multimap::reverse_iterator ri; std::multimap::const_reverse_iterator cri; +#endif // TEST_STD_VER <= 17 }; -int main(int, char**) -{ - - return 0; -} +int main(int, char**) { return 0; }