• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
      • From: Jeff DuMonthier <email@hidden>
References: 
 >XCode 3.0 header/scope/namespace issues? (From: Jeff DuMonthier <email@hidden>)
 >Re: XCode 3.0 header/scope/namespace issues? (From: Jeff DuMonthier <email@hidden>)
 >Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug? (From: Jeff DuMonthier <email@hidden>)

  • Prev by Date: Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
  • Next by Date: Re: Not sure what "Non-aligned pointer being freed" means...
  • Previous by thread: Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
  • Next by thread: Re: XCode 3.0 header/scope/namespace issues, gcc 4.0 bug?
  • Index(es):
    • Date
    • Thread