|
Last change
on this file since 47 was
29,
checked in by landauf, 17 years ago
|
|
updated boost from 1_33_1 to 1_34_1
|
|
File size:
766 bytes
|
| Line | |
|---|
| 1 | /* Copyright Bruno da Silva de Oliveira 2003. Use, modification and |
|---|
| 2 | distribution is subject to the Boost Software License, Version 1.0. |
|---|
| 3 | (See accompanying file LICENSE_1_0.txt or copy at |
|---|
| 4 | http:#www.boost.org/LICENSE_1_0.txt) |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | namespace inherit3 { |
|---|
| 8 | |
|---|
| 9 | struct A |
|---|
| 10 | { |
|---|
| 11 | A() { x = 0; } |
|---|
| 12 | struct X { int y; }; |
|---|
| 13 | int x; |
|---|
| 14 | virtual int foo() { return 0; } |
|---|
| 15 | virtual int foo(int x) { return x; } |
|---|
| 16 | A operator+(A o) const |
|---|
| 17 | { |
|---|
| 18 | A r; |
|---|
| 19 | r.x = o.x + x; |
|---|
| 20 | return r; |
|---|
| 21 | } |
|---|
| 22 | enum E { i, j }; |
|---|
| 23 | |
|---|
| 24 | }; |
|---|
| 25 | |
|---|
| 26 | struct B: A |
|---|
| 27 | { |
|---|
| 28 | B() { x = 0; } |
|---|
| 29 | struct X { int y; }; |
|---|
| 30 | int x; |
|---|
| 31 | int foo() { return 1; } |
|---|
| 32 | A operator+(A o) const |
|---|
| 33 | { |
|---|
| 34 | A r; |
|---|
| 35 | r.x = o.x + x; |
|---|
| 36 | return r; |
|---|
| 37 | } |
|---|
| 38 | enum E { i, j }; |
|---|
| 39 | |
|---|
| 40 | }; |
|---|
| 41 | |
|---|
| 42 | struct C: A |
|---|
| 43 | { |
|---|
| 44 | }; |
|---|
| 45 | |
|---|
| 46 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.