Re: Templates question
Re: Templates question
- Subject: Re: Templates question
- From: David Fang <email@hidden>
- Date: Fri, 23 Feb 2007 19:46:51 -0500 (EST)
> 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.
> I think there's a "be more standards compliant" settting for VC++ but
> it doesn't affect template instantiation.
I've heard (no first hand use) that recent versions are fairly
conformant when you ask them. I'll leave it to VC++ users to give their
qualified opinions and tips.
David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
http://www.csl.cornell.edu/~fang/
-- (2400 baud? Netscape 3.0?? lynx??? No problem!)
_______________________________________________
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