Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-05-25 09:48:24


on Sun May 25 2008, Beman Dawes <bdawes-AT-acm.org> wrote:

> There was some past discussion of changing the C++0x BOOST_HAS_* macros
> to BOOST_NO_*. Several participants thought that was better for the long
> run. Who needs to do what to make this happen?

IIRC the convention is BOOST_HAS_* when it's describing a nonstandard
feature and BOOST_NO_* when it's describing a standard feature that is
not supported be the compiler. In other words, IIUC, BOOST_NO_* is
reserved for describing nonconformances.

> The motivation for asking is that I'm starting to update some Boost code
> that could benefit from C++0x features and so would like to start using
> these macros.

of course, the fact that nonstandard features are now becoming standard
makes things somewhat awkward.

> Also, a C++03 workaround for the lack of the C++0x keyword "constexpr"
> is to simply omit it. Should we have a BOOST_CONSTEXPR macro defined as
> "constexpr" for platforms that support constexpr, otherwise as null?

That's not a bad idea. I wonder whether it might not be better just to

       #define constexpr

in that case, and use that symbol.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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