On Thu, 26 Mar 2020 at 12:27, Adam Wulkiewicz via Boost
W dniu 26.03.2020 o 11:45, Mateusz Loskot via Boost pisze:
On Thu, 26 Mar 2020 at 11:38, Alexander Grund via Boost
wrote: How would I tell the test matrix about this? By specifying cxx11 features as required in test/Jamfile
For example: https://github.com/boostorg/mp11/blob/develop/test/Jamfile#L15 https://github.com/boostorg/gil/blob/develop/test/Jamfile#L57-L63
Currently to check the standard support we have to use several macros or write our own check based on compiler version. Now more libraries are switching to the newer standard I think a set of macros defining full support for a standard would be useful so an author could check one macro as a base requirement for a library and from that point enable additional features conditionally. So what do you think about adding e.g. BOOST_CXX11, BOOST_CXX14, etc. to Boost.Config? Or in negated form: BOOST_NO_CXX11, BOOST_CXX14, etc. which we all learned to love. ;)
The macros are useful but only if you want to support multiple C++ versions simultaneously, 03 and 11, etc. In such case you rather want a feature-specific macro anyway, as it is also self-documenting and makes clear what kind of workaround you apply. The config checks are b2 mechanism. For Jamfile, an all-in-one check would be useful indeed e.g. [ requires cxx11 ] Best regards, -- Mateusz Loskot, http://mateusz.loskot.net