~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Puma/tests/misc/test19.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Object structure of the example:
 
2
//
 
3
//     A::f
 
4
//    /    \
 
5
//   B      H
 
6
//   |      |
 
7
//   C      D::f
 
8
//   |      |
 
9
//   E      F
 
10
//    \    /
 
11
//     G::g
 
12
//
 
13
// Test the "domination" rule of the name lookup.
 
14
// D::f() dominates A::f() although A::f() can
 
15
// be reached on a base class path that does not
 
16
// contain D (=> E->C->B-A).
 
17
 
 
18
struct A {void f();};
 
19
struct B : virtual A {};                        
 
20
struct H : virtual A {};
 
21
struct C : B {}; 
 
22
struct D : H {void f();};
 
23
struct E : C {}; 
 
24
struct F : D {};
 
25
struct G : E, F {
 
26
  void g() { f(); /* => D::f() */ }
 
27
};