re PR c++/60786 (In C++11 an explicit instantiation with an unqualified name must be in the right namespace)

PR c++/60786
	* testsuite/20_util/shared_ptr/requirements/explicit_instantiation/
	1.cc: Fix invalid explicit instantiations with unqualified names.
	* testsuite/20_util/shared_ptr/requirements/explicit_instantiation/
	2.cc: Likweise.
	* testsuite/20_util/tuple/53648.cc: Likweise.
	* testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc:
	Likewise.
	* testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/requirements/
	debug_container.cc: Likewise.
	* testsuite/23_containers/unordered_map/requirements/
	explicit_instantiation/3.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/requirements/debug.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/requirements/
	explicit_instantiation/3.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/requirements/debug.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/requirements/
	explicit_instantiation/3.cc: Likewise.
	* testsuite/23_containers/unordered_set/requirements/
	debug_container.cc: Likewise.
	* testsuite/23_containers/unordered_set/requirements/
	explicit_instantiation/3.cc: Likewise.

From-SVN: r209431
This commit is contained in:
Jonathan Wakely 2014-04-15 20:05:45 +01:00 committed by Jonathan Wakely
parent 227df36e33
commit 3a0f3672e5
14 changed files with 77 additions and 58 deletions

View File

@ -22,6 +22,33 @@
* include/std/atomic: Uglify parameter names.
PR c++/60786
* testsuite/20_util/shared_ptr/requirements/explicit_instantiation/
1.cc: Fix invalid explicit instantiations with unqualified names.
* testsuite/20_util/shared_ptr/requirements/explicit_instantiation/
2.cc: Likweise.
* testsuite/20_util/tuple/53648.cc: Likweise.
* testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/23_containers/unordered_map/requirements/
debug_container.cc: Likewise.
* testsuite/23_containers/unordered_map/requirements/
explicit_instantiation/3.cc: Likewise.
* testsuite/23_containers/unordered_multimap/requirements/debug.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/requirements/
explicit_instantiation/3.cc: Likewise.
* testsuite/23_containers/unordered_multiset/requirements/debug.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/requirements/
explicit_instantiation/3.cc: Likewise.
* testsuite/23_containers/unordered_set/requirements/
debug_container.cc: Likewise.
* testsuite/23_containers/unordered_set/requirements/
explicit_instantiation/3.cc: Likewise.
2014-04-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_vector.h (_Vector_base::_Vector_impl,

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2006-2014 Free Software Foundation, Inc.
@ -24,8 +24,7 @@
#include <testsuite_tr1.h>
using namespace __gnu_test;
using std::shared_ptr;
template class shared_ptr<int>;
template class shared_ptr<void>;
template class shared_ptr<ClassType>;
template class shared_ptr<IncompleteClass>;
template class std::shared_ptr<int>;
template class std::shared_ptr<void>;
template class std::shared_ptr<ClassType>;
template class std::shared_ptr<IncompleteClass>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -27,8 +27,7 @@
// library this checks the templates can be instantiated for non-default
// lock policy, for a single-threaded lib this is redundant but harmless.
using namespace __gnu_test;
using std::__shared_ptr;
using std::_S_single;
template class __shared_ptr<int, _S_single>;
template class __shared_ptr<ClassType, _S_single>;
template class __shared_ptr<IncompleteClass, _S_single>;
template class std::__shared_ptr<int, _S_single>;
template class std::__shared_ptr<ClassType, _S_single>;
template class std::__shared_ptr<IncompleteClass, _S_single>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2012-2014 Free Software Foundation, Inc.
@ -27,10 +27,10 @@ using std::tuple;
struct A { };
template class tuple<tuple<>>;
template class tuple<tuple<tuple<>>>;
template class tuple<A, tuple<A, tuple<A, tuple<A>>>>;
template class tuple<tuple<tuple<A, A>, A>, A>;
template class std::tuple<tuple<>>;
template class std::tuple<tuple<tuple<>>>;
template class std::tuple<A, tuple<A, tuple<A, tuple<A>>>>;
template class std::tuple<tuple<tuple<A, A>, A>, A>;
// Verify the following QoI properties are preserved

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2006-2014 Free Software Foundation, Inc.
@ -24,8 +24,7 @@
#include <testsuite_tr1.h>
using namespace __gnu_test;
using std::weak_ptr;
template class weak_ptr<int>;
template class weak_ptr<void>;
template class weak_ptr<ClassType>;
template class weak_ptr<IncompleteClass>;
template class std::weak_ptr<int>;
template class std::weak_ptr<void>;
template class std::weak_ptr<ClassType>;
template class std::weak_ptr<IncompleteClass>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -27,9 +27,8 @@
// library this checks the templates can be instantiated for non-default
// lock policy, for a single-threaded lib this is redundant but harmless.
using namespace __gnu_test;
using std::__weak_ptr;
using std::_S_single;
template class __weak_ptr<int, _S_single>;
template class __weak_ptr<void, _S_single>;
template class __weak_ptr<ClassType, _S_single>;
template class __weak_ptr<IncompleteClass, _S_single>;
template class std::__weak_ptr<int, _S_single>;
template class std::__weak_ptr<void, _S_single>;
template class std::__weak_ptr<ClassType, _S_single>;
template class std::__weak_ptr<IncompleteClass, _S_single>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -21,18 +21,16 @@
#include <string>
#include <debug/unordered_map>
using namespace __gnu_debug;
using std::allocator;
using std::equal_to;
using std::hash;
using std::pair;
using std::string;
template class unordered_map<string, float>;
template class unordered_map<string, int,
hash<string>, equal_to<string>,
allocator<pair<const string, int> > >;
template class unordered_map<string, float,
hash<string>, equal_to<string>,
allocator<char> >;
template class __gnu_debug::unordered_map<string, float>;
template class __gnu_debug::unordered_map<string, int,
hash<string>, equal_to<string>,
allocator<pair<const string, int>>>;
template class __gnu_debug::unordered_map<string, float,
hash<string>, equal_to<string>,
allocator<char>>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -21,4 +21,5 @@
#include <unordered_map>
using namespace std;
template class unordered_map<int, int, hash<int>, equal_to<int>, allocator<char>>;
template class std::unordered_map<int, int, hash<int>, equal_to<int>,
allocator<char>>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -21,8 +21,6 @@
#include <string>
#include <debug/unordered_map>
using namespace __gnu_debug;
using std::string;
template class unordered_multimap<string, float>;
template class __gnu_debug::unordered_multimap<string, float>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -21,4 +21,5 @@
#include <unordered_map>
using namespace std;
template class unordered_multimap<int, int, hash<int>, equal_to<int>, allocator<char>>;
template class std::unordered_multimap<int, int, hash<int>, equal_to<int>,
allocator<char>>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -21,6 +21,4 @@
#include <string>
#include <debug/unordered_set>
using namespace __gnu_debug;
template class unordered_multiset<int>;
template class __gnu_debug::unordered_multiset<int>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -21,4 +21,5 @@
#include <unordered_set>
using namespace std;
template class unordered_multiset<int, hash<int>, equal_to<int>, allocator<char>>;
template class std::unordered_multiset<int, hash<int>, equal_to<int>,
allocator<char>>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -20,6 +20,4 @@
#include <debug/unordered_set>
using namespace __gnu_debug;
template class unordered_set<int>;
template class __gnu_debug::unordered_set<int>;

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
@ -21,4 +21,5 @@
#include <unordered_set>
using namespace std;
template class unordered_set<int, hash<int>, equal_to<int>, allocator<char>>;
template class std::unordered_set<int, hash<int>, equal_to<int>,
allocator<char>>;