C++ Logo

SG10

Advanced search

Subject: Re: [SG10] Should there be feature-testing for library features?
From: John Spicer (jhs_at_[hidden])
Date: 2013-01-25 12:22:13


On Jan 25, 2013, at 12:56 PM, Nelson, Clark wrote:

>>> Or would it make more sense just to limit our scope to language
>> features?
>>
>> Can I ask a stupid question?
>>
>> What are we defining as a "feature"?
>
> That's not at all a stupid question; answering that is one of the really significant problems that this study group was formed to investigate.
>
> For the moment, we're just using it to mean the obvious: a new thing in a standard.

Actually, I think it should be broader than that. A number of implementations allow you to disable certain features such as RTTI. It would be helpful to have the mechanism to provide a standard way of testing for such things.

We might also want to allow it to be used to test for conditionally supported features.

John.

>
>> And should we be able to detect it at compile time, or runtime, or both?
>
> The problem is how to deal with different implementations (including different compilers), some of which have a feature, and others of which do not. If an implementation doesn't have a feature, a program that tries to use it won't be able to build. So we're talking about detecting the presence of a feature at compile time.
>
> Clark
> _______________________________________________
> Features mailing list
> Features_at_[hidden]
> http://www.open-std.org/mailman/listinfo/features


SG10 list run by sg10-owner@lists.isocpp.org