1// PR c++/53403
2
3template <typename T>
4class Foo
5{
6  typedef void type;
7  template <typename U> friend void f();
8public:
9  Foo() {}
10};
11
12template class Foo<void>;
13
14template <typename T>
15void f()
16{
17  typedef Foo<void>::type type;
18}
19
20int main()
21{
22  f<void>();
23}
24