Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
- Subject: Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
- From: Alastair Houghton <email@hidden>
- Date: Mon, 26 Nov 2007 14:11:24 +0000
On 26 Nov 2007, at 13:11, Jeff DuMonthier wrote:
I did a little more experimenting and found that a using clause can
allow access to inherited members in a template class without
explicit scoping. That will dramatically reduce the amount of
editing necessary to fix things if I have to, but I still find it
hard to believe this is correct behavior.
It *is* correct behaviour AFAIK. It's all to do with the rules for
looking up symbols defined in template base classes. I believe the
relevant bit of the standard is 14.6.2 paragraph 3, where it says:
In the definition of a class template or a member of a class
template, if a
base class of the class template depends on a template-parameter,
the base class
scope is not examined during unqualified name lookup either at the
point of
definition of the class template or member or during an
instantiation of the class
template or member.
This is one of many areas where the defined behaviour of C++ deviates
substantially from programmers' expectations.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden