• 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: John Mikros <email@hidden>
  • Date: Fri, 23 Feb 2007 17:21:31 -0800


On Feb 23, 2007, at 4:46 PM, David Fang wrote:

Visual C++ doesn't seem to do two-phase lookup at all.  In fact your
template can be complete garbage and the code will compile as long as
that template is never instantiated.  I'm not defending VC++; I've
just had to deal with its differences from GCC, and this one's been a
big headache.

Hi,
	The fact that you can have "garbage" in template definitions
indicates that it *is* doing two-phase lookup -- it is punting
first-phase lookups correctly.  Whether or not it *requires* you to
qualify the names to coerce 2nd-phase lookup is another matter.

As far as I understand it, two-phase lookup means that any non- dependent symbols are looked up at the point of template declaration, and then dependent symbols are looked up at the point of instantiation. VC++ is doing all lookups at the point of instantiation.



_______________________________________________ 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: Templates question
  • Next by Date: Re: Templates question
  • Previous by thread: Re: Templates question
  • Next by thread: Re: Templates question
  • Index(es):
    • Date
    • Thread