summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/friend7.C
blob: aed56a187ddf4b503176573de3efd4830db61a2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do assemble  }
// Origin: Martin v. L�wis  <loewis@informatik.hu-berlin.de>
// Test that a friend declaration with an explicit :: finds the right fn.

namespace M {
class S; 
}
void foo(M::S *);

namespace M {
class S {
  friend void (::foo)(S *);
  void Fn(); 
  static S s;
};
} 

void (foo)(M::S *ptr) {
  M::S::s.Fn();
  ptr->Fn();
}