2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / memfriend8.C
blob886096b9d54a1c7d0e9375715a761cafb4fca89f
1 // { dg-do compile }
3 // Origin: Martin Sebor <sebor@roguewave.com>
5 // PR c++/5369: Member function of class template as friend
7 template <class T>
8 struct S
10   int foo () {
11     return S<int>::bar ();
12   }
14 private:
16   template <class U>
17   friend int S<U>::foo ();
19   static int bar () { return 0; }
22 int main ()
24   S<char>().foo ();