Re: Templates question
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