re PR c++/42328 (rejects valid friend)
2015-03-28 Paolo Carlini <paolo.carlini@oracle.com> PR c++/42328 * g++.dg/template/friend58.C: New. * g++.dg/template/friend59.C: Likewise. From-SVN: r221751
This commit is contained in:
parent
2894311302
commit
f8f40e69b0
|
@ -1,3 +1,9 @@
|
|||
2015-03-28 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/42328
|
||||
* g++.dg/template/friend58.C: New.
|
||||
* g++.dg/template/friend59.C: Likewise.
|
||||
|
||||
2015-03-27 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR c/65586
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
// PR c++/42328
|
||||
|
||||
template<typename T, typename U>
|
||||
class freeList
|
||||
{
|
||||
public:
|
||||
void foo() {};
|
||||
};
|
||||
|
||||
class bar {};
|
||||
|
||||
class baz : protected freeList<bar, baz>
|
||||
{
|
||||
template<typename T>
|
||||
friend
|
||||
void freeList<T, baz>::foo(); // { dg-error "friend" }
|
||||
};
|
||||
|
||||
baz b;
|
|
@ -0,0 +1,22 @@
|
|||
// PR c++/42328
|
||||
|
||||
template<typename T, typename U>
|
||||
class freeList
|
||||
{
|
||||
public:
|
||||
void foo() {};
|
||||
};
|
||||
|
||||
class bar {};
|
||||
|
||||
class baz;
|
||||
template<typename T> class freeList<T, baz> { void foo(); };
|
||||
|
||||
class baz : protected freeList<bar, baz>
|
||||
{
|
||||
template<typename T>
|
||||
friend
|
||||
void freeList<T, baz>::foo();
|
||||
};
|
||||
|
||||
baz b;
|
Loading…
Reference in New Issue