• 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: Templates question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Templates question


  • Subject: Re: Templates question
  • From: Thomas Engelmeier <email@hidden>
  • Date: Mon, 26 Feb 2007 16:20:42 +0100


Am 24.02.2007 um 01:27 schrieb David Fang:

Another solution instead of this-> is to place the following
declaration in class bar's definition:
using foo<T>::SetUpRenderStates;

[...]


By qualifying the call to your_method(), (with "this->" or "base_class::"
you're telling the compiler to postpone the name lookup until template
*instantiation*. (Because a template-dependent base class can be
specialized with a completely different definition.) This is the idea
behind two-phase name lookup.

[...]

Visual C++ 2005 does not give an error for that code.

Not familiar with VC, but you might look for various options to enforce
standard conformance. For gcc, I recommend: -ansi -pedantic-errors.

The good news is that at least VC++ 2005 does not choke on the version

using base<T>::some_method;

(I can't comment on this-> some_method();, as IIRC I used the former version las year for some port from VC++ to OS X)

Regards,
	Tom_E
_______________________________________________
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


References: 
 >Re: Templates question (From: David Fang <email@hidden>)

  • Prev by Date: Re: mulithreading, dual-core
  • Next by Date: Re: To Uninstall XCode 2.0
  • Previous by thread: Re: Templates question
  • Next by thread: How to Fix Warning Message?
  • Index(es):
    • Date
    • Thread