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 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 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 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; }