2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / friend7.C
blob1055d99ceae74a49e62471e36879458863261211
1 // { dg-do assemble  }
2 // Origin: Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3 // Test that a friend declaration with an explicit :: finds the right fn.
5 namespace M {
6 class S; 
8 void foo(M::S *);
10 namespace M {
11 class S {
12   friend void (::foo)(S *);
13   void Fn(); 
14   static S s;
16
18 void (::foo)(M::S *ptr) {
19   M::S::s.Fn();
20   ptr->Fn();
21