FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.dg / template / friend14.C
blob6e07b98932a4269181255297f88e502782921bd5
1 // { dg-do compile }
3 // Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
5 // Perform access checking to parameter and return type of 
6 // function template correctly when the template is friend.
8 template <class T> class O {
9   struct I { I (int); };
11   template <class T_>
12   friend typename O<T_>::I f ();
15 template <class T_>
16 typename O<T_>::I f () { return 1; }
18 struct X {
19     void g() { f<int>(); }