This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ambiguous base class
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Matt Austern <austern at apple dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Wolfgang Bangerth<bangerth at ticam dot utexas dot edu>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 10 Sep 2002 17:14:07 +0100
- Subject: Re: Ambiguous base class
- Organization: Codesourcery LLC
- References: <D2E59600-C4D4-11D6-B1EF-000393B2ABA2@apple.com>
Matt Austern wrote:
The relevant part of the Standard is 3.4.3, I think. I read it,
No, 3.4.5 applies for lookup after . and ->
The relevant para appears to be 4, which doesn't explicitly mention
ptr->IntermediateBase::FinalBase::member
but does say that the class name doesn't have to be a unique base
of the class type of the object expression, as long as
the entitiy named by the qualified id are members of the class type
of the object expression and not ambiguous.
The class type of the object expression is the static type of the
thing before the ->.
<handwaving>
The std seems to consider qualified ids as
context-type-thing::(qualified-id-chain)::final-thing
rather than
((context-type-thing::qualified-id0)::qualified-idn)::final-thing
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org