tmp/tmpncze_fc0/{from.md → to.md}
RENAMED
|
@@ -16,22 +16,22 @@ class D : public A, public B, public C { ... };
|
|
| 16 |
|
| 17 |
— *end example*]
|
| 18 |
|
| 19 |
[*Note 2*: The order of derivation is not significant except as
|
| 20 |
specified by the semantics of initialization by constructor
|
| 21 |
-
[[class.base.init]], cleanup [[class.dtor]], and storage layout
|
| 22 |
-
[[class.mem]], [[class.access.spec]]
|
| 23 |
|
| 24 |
A class shall not be specified as a direct base class of a derived class
|
| 25 |
more than once.
|
| 26 |
|
| 27 |
[*Note 3*: A class can be an indirect base class more than once and can
|
| 28 |
be a direct and an indirect base class. There are limited things that
|
| 29 |
-
can be done with such a class
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
|
| 34 |
[*Example 2*:
|
| 35 |
|
| 36 |
``` cpp
|
| 37 |
class X { ... };
|
|
@@ -69,12 +69,12 @@ subobjects of class `L` as shown in Figure [[fig:class.nonvirt]].
|
|
| 69 |
<a id="fig:class.nonvirt"></a>
|
| 70 |
|
| 71 |
![Non-virtual base \[fig:class.nonvirt\]](images/fignonvirt.svg)
|
| 72 |
|
| 73 |
In such lattices, explicit qualification can be used to specify which
|
| 74 |
-
subobject is meant. The body of function `C::f`
|
| 75 |
-
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
void C::f() { A::next = B::next; } // well-formed
|
| 79 |
```
|
| 80 |
|
|
|
|
| 16 |
|
| 17 |
— *end example*]
|
| 18 |
|
| 19 |
[*Note 2*: The order of derivation is not significant except as
|
| 20 |
specified by the semantics of initialization by constructor
|
| 21 |
+
[[class.base.init]], cleanup [[class.dtor]], and storage layout
|
| 22 |
+
[[class.mem]], [[class.access.spec]]. — *end note*]
|
| 23 |
|
| 24 |
A class shall not be specified as a direct base class of a derived class
|
| 25 |
more than once.
|
| 26 |
|
| 27 |
[*Note 3*: A class can be an indirect base class more than once and can
|
| 28 |
be a direct and an indirect base class. There are limited things that
|
| 29 |
+
can be done with such a class; lookup that finds its non-static data
|
| 30 |
+
members and member functions in the scope of the derived class will be
|
| 31 |
+
ambiguous. However, the static members, enumerations and types can be
|
| 32 |
+
unambiguously referred to. — *end note*]
|
| 33 |
|
| 34 |
[*Example 2*:
|
| 35 |
|
| 36 |
``` cpp
|
| 37 |
class X { ... };
|
|
|
|
| 69 |
<a id="fig:class.nonvirt"></a>
|
| 70 |
|
| 71 |
![Non-virtual base \[fig:class.nonvirt\]](images/fignonvirt.svg)
|
| 72 |
|
| 73 |
In such lattices, explicit qualification can be used to specify which
|
| 74 |
+
subobject is meant. The body of function `C::f` can refer to the member
|
| 75 |
+
`next` of each `L` subobject:
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
void C::f() { A::next = B::next; } // well-formed
|
| 79 |
```
|
| 80 |
|