2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / friend34.C
blob5e80ab98b2ec4dc71ccbf9bc0384e4864ad9f3a0
1 // { dg-do assemble  }
3 // This testcase won't fail if class ::foo is forward-declared in the
4 // global namespace, nor if class bar is not a template class.
6 template <typename T = void>
7 class bar {
8 public:
9   friend class foo; // this is not bar::foo, it forward-declares ::foo
10   class foo {};
11   bar() { foo(); } // but this should refer to bar::foo
14 bar<> baz;