Boost logo

Boost :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2020-03-26 11:39:19

On Thu, 26 Mar 2020 at 12:27, Adam Wulkiewicz via Boost
<boost_at_[hidden]> wrote:
> 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
> > <boost_at_[hidden]> wrote:
> >> How would I tell the test matrix about this?
> > By specifying cxx11 features as required in test/Jamfile
> >
> > For example:
> >
> >
> 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,

Boost list run by bdawes at, gregod at, cpdaniel at, john at