Boost logo

Boost :

Subject: Re: [boost] New C++14 config macros - opinions wanted
From: Stephen Kelly (hello_at_[hidden])
Date: 2014-09-25 02:50:46


John Maddock wrote:

> There is a pull request to add new config macros for C++14 features
> (https://github.com/boostorg/config/pull/39), I have a few questions
> really, particularly for those more familiar with C++14 than me:
>
> * Do we need these?

As a data-point, Qt expects the SD-6 macros to be present and working for
C++14 features, instead of providing similar macros.

 https://codereview.qt-project.org/#/c/87474/

I'd recommend to use the SD-6 macros instead wherever provided, until
there's a reason to add a wrapper macro (such as a broken implementation).

> * Are these the correct names?

CMake also aims to use the same names as used by clang __has_feature, with a
few exceptions. Mostly these are also the same as the SD-6 names.

 http://www.cmake.org/cmake/help/git-master/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES

Given that SD-6 uses one name with different numerical values
(__cpp_constexpr) for something which clang expresses with two names
(__cxx_constexpr and __cxx_relaxed_constexpr), and given that C++17 might
make constexpr even more 'relaxed', it's not certain how long naming can be
sub-contracted to clang :).

Thanks,

Steve.


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