2019-06-06 Jonathan Wakely <jwakely@redhat.com>
+ * testsuite/23_containers/deque/requirements/explicit_instantiation/
+ 1_c++0x.cc: Remove redundant test.
+ * testsuite/23_containers/deque/requirements/explicit_instantiation/
+ 2.cc: Use target selector instead of preprocessor condition.
+ * testsuite/23_containers/deque/requirements/explicit_instantiation/
+ 3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/forward_list/requirements/
+ explicit_instantiation/3.cc: Likewise.
+ * testsuite/23_containers/forward_list/requirements/
+ explicit_instantiation/5.cc: Do not test allocator rebinding extension
+ for C++2a.
+ * testsuite/23_containers/list/requirements/explicit_instantiation/
+ 1_c++0x.cc: Remove redundant test.
+ * testsuite/23_containers/list/requirements/explicit_instantiation/
+ 2.cc: Use target selector instead of preprocessor condition.
+ * testsuite/23_containers/list/requirements/explicit_instantiation/
+ 3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/list/requirements/explicit_instantiation/
+ 5.cc: Do not test allocator rebinding extension for C++2a.
+ * testsuite/23_containers/map/requirements/explicit_instantiation/
+ 1_c++0x.cc: Remove redundant test.
+ * testsuite/23_containers/map/requirements/explicit_instantiation/
+ 2.cc: Adjust comment.
+ * testsuite/23_containers/map/requirements/explicit_instantiation/
+ 3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/map/requirements/explicit_instantiation/
+ 5.cc: Do not test allocator rebinding extension for C++2a.
+ * testsuite/23_containers/multimap/requirements/explicit_instantiation/
+ 1_c++0x.cc: Remove redundant test.
+ * testsuite/23_containers/multimap/requirements/explicit_instantiation/
+ 3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/multimap/requirements/explicit_instantiation/
+ 5.cc: Do not test allocator rebinding extension for C++2a.
+ * testsuite/23_containers/multiset/requirements/explicit_instantiation/
+ 3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/multiset/requirements/explicit_instantiation/
+ 5.cc: Do not test allocator rebinding extension for C++2a.
+ * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
+ Do not run test for C++2a.
+ * testsuite/23_containers/set/requirements/explicit_instantiation/
+ 1_c++0x.cc: Remove redundant test.
+ * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
+ Do not test allocator rebinding extension for C++2a.
+ * testsuite/23_containers/unordered_map/requirements/
+ explicit_instantiation/3.cc: Likewise.
+ * testsuite/23_containers/unordered_map/requirements/
+ explicit_instantiation/5.cc: Do not test allocator rebinding extension
+ for C++2a.
+ * testsuite/23_containers/unordered_multimap/requirements/
+ explicit_instantiation/3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/unordered_multimap/requirements/
+ explicit_instantiation/5.cc: Do not test allocator rebinding extension
+ for C++2a.
+ * testsuite/23_containers/unordered_multiset/requirements/
+ explicit_instantiation/3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/unordered_multiset/requirements/
+ explicit_instantiation/5.cc: Do not test allocator rebinding extension
+ for C++2a.
+ * testsuite/23_containers/unordered_set/requirements/
+ explicit_instantiation/3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/unordered_set/requirements/
+ explicit_instantiation/5.cc: Do not test allocator rebinding extension
+ for C++2a.
+ * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
+ 2.cc: Remove redundant test.
+ * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
+ 3.cc: Do not run test for C++2a.
+ * testsuite/23_containers/vector/requirements/explicit_instantiation/
+ 3.cc: Likewise.
+
* include/std/type_traits (is_empty, is_polymorphic, is_final)
(is_abstract, is_aggregate): Remove static_assert.
* testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
+++ /dev/null
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <deque>
-
-template class std::deque<int>;
#include <deque>
#include <testsuite_api.h>
-// { dg-do compile }
+// { dg-do compile { target c++98_only } }
-// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible
-// because of 23.3.2.1.4
-#if __cplusplus < 201103L
+// N.B. Since C++11 we cannot instantiate with T == NonDefaultConstructible
+// because of [deque.cons] p4: "Requires: T shall be DefaultConstructible."
template class std::deque<__gnu_test::NonDefaultConstructible>;
-#endif
#include <deque>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::deque<int, std::allocator<char> >;
#include <forward_list>
// { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::forward_list<int, std::allocator<char> >;
// libstdc++/50118
template class std::forward_list<int, __gnu_test::ExplicitConsAlloc<int>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::forward_list<int, __gnu_test::ExplicitConsAlloc<char>>;
#endif
+++ /dev/null
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <list>
-
-template class std::list<int>;
#include <list>
#include <testsuite_api.h>
-// { dg-do compile }
+// { dg-do compile { target c++98_only } }
-// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible
-// because of 23.3.4.1.4
-#if __cplusplus < 201103L
+// N.B. Since C++11 we cannot instantiate with T == NonDefaultConstructible
+// because of [list.cons] p4: "Requires: T shall be DefaultConstructible."
template class std::list<__gnu_test::NonDefaultConstructible>;
-#endif
#include <list>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::list<int, std::allocator<char> >;
// libstdc++/50118
template class std::list<int, __gnu_test::ExplicitConsAlloc<int> >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::list<int, __gnu_test::ExplicitConsAlloc<char> >;
#endif
+++ /dev/null
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <map>
-
-template class std::map<int, double>;
// { dg-do compile }
// N.B. We cannot instantiate with T == NonDefaultConstructible
-// because of 23.3.1.2.
+// because of [map.access] p2: "mapped_type shall be DefaultConstructible."
template class std::map<__gnu_test::NonDefaultConstructible, double>;
#include <map>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::map<int, double, std::less<int>, std::allocator<char> >;
// libstdc++/50118
template class std::map<int, int, std::less<int>,
ExplicitConsAlloc<std::pair<const int, int> > >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::map<int, int, std::less<int>,
ExplicitConsAlloc<char> >;
#endif
+++ /dev/null
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <map>
-
-template class std::multimap<int, double>;
#include <map>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::multimap<int, double, std::less<int>, std::allocator<char> >;
// libstdc++/50118
template class std::multimap<int, int, std::less<int>,
ExplicitConsAlloc<std::pair<const int, int> > >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::multimap<int, int, std::less<int>,
ExplicitConsAlloc<char> >;
#endif
#include <set>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::multiset<int, std::less<int>, std::allocator<char> >;
// libstdc++/50118
template class std::multiset<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<int> >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::multiset<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<char> >;
#endif
+++ /dev/null
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <set>
-
-template class std::set<int>;
#include <set>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::set<int, std::less<int>, std::allocator<char> >;
// libstdc++/50118
template class std::set<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<int> >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::set<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<char> >;
#endif
// { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// Copyright (C) 2007-2019 Free Software Foundation, Inc.
//
// libstdc++/50118
template class std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
ExplicitConsAlloc<std::pair<const int, int>>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
ExplicitConsAlloc<char>>;
#endif
// { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// Copyright (C) 2007-2019 Free Software Foundation, Inc.
//
template class
std::unordered_multimap<int, int, std::hash<int>, std::equal_to<int>,
ExplicitConsAlloc<std::pair<const int, int>>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::unordered_multimap<int, int, std::hash<int>,
std::equal_to<int>,
ExplicitConsAlloc<char>>;
// { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// Copyright (C) 2007-2019 Free Software Foundation, Inc.
//
// libstdc++/50118
template class std::unordered_multiset<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<int>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::unordered_multiset<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<char>>;
#endif
// { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// Copyright (C) 2007-2019 Free Software Foundation, Inc.
//
// libstdc++/50118
template class std::unordered_set<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<int>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
template class std::unordered_set<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<char>>;
#endif
+++ /dev/null
-// Test for Container using non-standard pointer types.
-
-// Copyright (C) 2011-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-
-#include <vector>
-#include <ext/extptr_allocator.h>
-
-// { dg-do compile { target c++11 } }
-
-template class std::vector<int, __gnu_cxx::_ExtPtr_allocator<int> >;
#include <ext/extptr_allocator.h>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::vector<int, __gnu_cxx::_ExtPtr_allocator<char> >;
#include <vector>
// { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
// libstdc++/21770
template class std::vector<int, std::allocator<char> >;