Re: Templates question
Re: Templates question
- Subject: Re: Templates question
- From: John Mikros <email@hidden>
- Date: Fri, 23 Feb 2007 22:12:24 -0800
On Feb 23, 2007, at 9:43 PM, John Daniel wrote: On Feb 23, 2007, at 6:37 PM, John Mikros 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.
That one isn't really VC's problem. GCC is just as happy with uninstantiated garbage.
That is not true.
As long as the following is not instantiated, it compiles in Visual C++, but not in GCC.
template <typename T> class foo { foo(T t) { this is garbage } };
|
_______________________________________________
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