OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [friend7.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do assemble  }
2
// Origin: Martin v. Löwis  
3
// Test that a friend declaration with an explicit :: finds the right fn.
4
 
5
namespace M {
6
class S;
7
}
8
void foo(M::S *);
9
 
10
namespace M {
11
class S {
12
  friend void (::foo)(S *);
13
  void Fn();
14
  static S s;
15
};
16
}
17
 
18
void (foo)(M::S *ptr) {
19
  M::S::s.Fn();
20
  ptr->Fn();
21
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.