diff --git a/source/classes.tex b/source/classes.tex index a754160838..f907f2d5b9 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -3654,6 +3654,27 @@ \end{importgraphic} \end{note} +\pnum +\indextext{base class!ambiguous}% +\indextext{base class!unambiguous}% +If an object of class \tcode{D} has a single base class subobject of type \tcode{B}, +\tcode{B} is an \defnadj{unambiguous}{base class} of \tcode{D}. +If an object of class \tcode{D} has more than one base class subobject of type \tcode{B}, +\tcode{B} is an \defnadj{ambiguous}{base class} of \tcode{D}. +\begin{example} +\begin{codeblock} +class B { @\commentellip@ }; +class MX : public B { @\commentellip@ }; +class MY : public B { @\commentellip@ }; +class D1 : public MX, public MY { @\commentellip@ }; // \tcode{B} is an ambiguous base class of \tcode{D1} +class D2 : public MX, public B { @\commentellip@ }; // \tcode{B} is an ambiguous base class of \tcode{D2} + +class VMX : virtual public B { @\commentellip@ }; +class VMY : virtual public B { @\commentellip@ }; +class D3 : public VMX, public VMY { @\commentellip@ }; // \tcode{B} is an unambiguous base class of \tcode{D3} +\end{codeblock} +\end{example} + \rSec2[class.virtual]{Virtual functions}% \indextext{function!virtual|(}% \indextext{type!polymorphic}% pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy