re PR c++/53403 (Function template friend denied access to private types of granting template class.)

2012-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53403
	* g++.dg/template/friend53.C

From-SVN: r192108
This commit is contained in:
Paolo Carlini 2012-10-04 23:19:46 +00:00 committed by Paolo Carlini
parent 693445c912
commit 87a52ec1f6
2 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53403
* g++.dg/template/friend53.C
2012-10-04 Eric Botcazou <ebotcazou@adacore.com>
* lib/gcc-dg.exp (cleanup-ada-spec): New procedure.

View File

@ -0,0 +1,23 @@
// PR c++/53403
template <typename T>
class Foo
{
typedef void type;
template <typename U> friend void f();
public:
Foo() {}
};
template class Foo<void>;
template <typename T>
void f()
{
typedef Foo<void>::type type;
}
int main()
{
f<void>();
}