2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / friend12.C
blob0cd561b5a2a205269c6922212b65dbd49a9d0d17
1 // { dg-do compile }
3 // Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
5 // PR 9030.  Perform access checking to parameter and return type of 
6 // function template correctly when the template is friend.
8 template <class T> class Outer {
9   private:
10     struct Inner {};
12     template <class T_>
13     friend typename Outer<T_>::Inner foo ();
16 template <class T>
17 typename Outer<T>::Inner
18 foo () {
19   return typename Outer<T>::Inner();
22 void f() {
23   foo<int>();