Re: Templates question
Re: Templates question
- Subject: Re: Templates question
- From: John Daniel <email@hidden>
- Date: Fri, 23 Feb 2007 23:43:10 -0600
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. As long as the syntax looks correct, you
won't get errors. This is not necessarily a trivial matter. There is
always a temptation, especially when writing "generic" template code,
to write functions that you "might need" at some point in the future.
Then, 18 months after you release it, you realize that your template
libraries are full of bugs. Then you have to go explain to your boss
why you have to re-do a bunch of code that passed all the
qualification tests and was delivered to the customer(s). That is an
extreme example, but only in scale. It happens, we just don't tell
the boss :)
It would sure be nice if Purify and PureCoverage ran on the Mac. I
don't know of any Mac equivalents.
I think there's a "be more standards compliant" settting for VC++
but it doesn't affect template instantiation.
A "problem" with C++ under both Xcode and VC is that neither platform
really prefers C++. MS is shifting their focus onto .NET and Apple is
in Objective-C territory. So far, I really haven't had much trouble
mixing lower-level C++ libraries with Objective-C++ UI code. That
seems to be much harder to do with MS Managed Code. in VS.
John
_______________________________________________
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