
David Abrahams wrote:
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.
Yes, that's my understanding too.
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.
Yes. Doug and I had a discussion of this, and decided that in the long run we were better off with the BOOST_NO_* approach.
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.
I thought of that, and decided it wasn't a good idea to define a symbol that non-boost code might also be using and/or redefining. But that's only a weak opinion, and I'm open to reconsidering it. What do others think? --Beman