Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2006-11-23 04:34:47


AlisdairM wrote:
> Douglas Gregor wrote:
>
>> To support this goal, I have committed a set of changes to the Boost
>> config library (on CVS HEAD), which add several new macros to
>> indicate the availability of C++0x features. The list involves only
>> features that I know have been implemented; see below for the
>> compilers that support various features. The new configuration
>> macros are:
>>
>> BOOST_CXX0X_LONG_LONG: long long support (aliases
>> BOOST_HAS_LONG_LONG) BOOST_CXX0X_PREPROCESSOR: C99 preprocessor
>> extensions BOOST_CXX0X_RVALUE_REFERENCES: rvalue references
>> BOOST_CXX0X_STATIC_ASSERT: static assertions
>> BOOST_CXX0X_CONCEPTS: concepts (not yet accepted)
>> BOOST_CXX0X_VARIADIC_TEMPLATES: variadic templates (not yet
>> accepted)
>
> Should these be positive or negative feature tests?
> I am imagining that once tests for these features are in place,
> library maintainers will not want to revisit code once C++0x is
> published to test for BOOST_NO_VARIADIC_TEMPLATES instead. The
> latter form is more typical of how we deal with feature-detection
> today.
>
> As library maintainer John Maddoc should get the final call, but my
> preference would be BOOST_NO_FEATURE forms. It should be fairly easy
> to create a single header that all compiler configs can use, and then
> selectively undef features in the compiler config file itself as new
> features are implemented.

It's a tricky one this: normally we would use BOOST_HAS_WHATEVER since these
features aren't std yet, however as you say, they will be soon. So I could
go either way. The names should probably be either BOOST_HAS_WHATEVER or
BOOST_NO_WHATEVER though so it's clear what we're talking about!

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk