|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-03-01 16:43:19
Phil Richards <news_at_[hidden]> writes:
> On Mon, 01 Mar 2004 18:09:20 +0000, Paul A Bristow wrote:
> [Daniel Frey said:]
>> | I really suggest you look at my code at
>> | <http://groups.yahoo.com/group/boost/files/MathConstants/>, which solves
>> | all of the above points.
>> Except that VC 7.1 doesn't think it is legal C++ :-((
>> I think we need to establish if it is correct (as gcc and Intel think it
>> is)
>
> Nope, as has been said a number of times, it is not valid C++. typeof is
> not in the existing C++ standard. It is a very useful extension
> implemented by a number of vendors, but that doesn't make it standard.
>
>> Or to find some workaround that VC 7.1 will accept.
>
> Indeed.
>
>> It would be helpful to know what do other highly conformant compilers,
>> like CodeWarrior and Comeau, say about Daniel Frey's proposal?
>
> Well, you still have to get over the boost Guidelines saying:
> Aim for ISO Standard C++. Than means making effective use of the standard
> features of the language, and avoiding non-standard compiler extensions.
> It also means using the C++ Standard Library where applicable.
>
> It doesn't forbid using extensions, but I seem to remember David Abrahams
> being a little more assertive about not using non-standard extensions :-)
To be precise, code should usually not *rely* on non-standard
extensions. It's fine to use non-standard extensions if they can
make the library perform better, use less code, etc., but there
should be a fallback position for compilers that don't support the
extension.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk