re PR c++/68170 (Declaring friend template class template in C++1z produces error: specialization of ‘template<class T> class A’ must appear at namespace)
PR c++/68170 * pt.c (maybe_new_partial_specialization): The injected-class-name is not a new partial specialization. From-SVN: r231380
This commit is contained in:
parent
122ea31075
commit
7873d5fbc3
|
@ -1,5 +1,9 @@
|
|||
2015-12-07 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/68170
|
||||
* pt.c (maybe_new_partial_specialization): The injected-class-name
|
||||
is not a new partial specialization.
|
||||
|
||||
* Make-lang.in (check-c++1z, check-c++-all): Use GXX_TESTSUITE_STDS.
|
||||
|
||||
2015-12-06 Jason Merrill <jason@redhat.com>
|
||||
|
|
|
@ -855,6 +855,10 @@ maybe_new_partial_specialization (tree type)
|
|||
if (!current_template_parms)
|
||||
return NULL_TREE;
|
||||
|
||||
// The injected-class-name is not a new partial specialization.
|
||||
if (DECL_SELF_REFERENCE_P (TYPE_NAME (type)))
|
||||
return NULL_TREE;
|
||||
|
||||
// If the constraints are not the same as those of the primary
|
||||
// then, we can probably create a new specialization.
|
||||
tree type_constr = current_template_constraints ();
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
// PR c++/68170
|
||||
|
||||
template< typename T >
|
||||
class A
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
class A< void >
|
||||
{
|
||||
template< typename X >
|
||||
friend class A;
|
||||
};
|
Loading…
Reference in New Issue