Boost logo

Boost-Build :

Subject: Re: [Boost-build] adding tests conditional on compiler's C++11 support
From: Robert Ramey (ramey_at_[hidden])
Date: 2016-11-11 14:29:16

On 11/11/16 10:25 AM, John Maddock wrote:
>> I'm guessing that forward_list actually exists
>> and is usable in C++03 (at least to the minimum
>> required by boost_no_hdr_cxx11_forward_list.ipp),
>> but that this is not recognized by the macros
>> in Boost.Config (which are determined strictly
>> by checking predefined macros).
> That would be my guess too, but I don't have gcc-4.2.x installed to
> check, it would be useful if someone who has that compiler can check if
> the Config test case builds in C++03 mode, and if so whether
> <forward_list> is genuinely usable (or whether our test is too simplistic).
> There are also some GCC versions which support C++11 features in C++03
> mode, but complain so loudly about doing so that the feature is
> effectively unusable.
> John.
> _______________________________________________
> Unsubscribe & other changes:

This seems to be on the right track. But aren't the Boost.Config macros
generated by calling this code? Shouldn't Boost.Config always be in
sync with what boost build does? And where is the C++11 switch enter in
to all this. It's very obscure to me.

It's been suggested that I just drop the #ifdef
BOOST_NO_CXX11_HDR_FORWARD_LIST in the test code. I'm reluctant to do
that because then I'm acknowledging that boost build and Boost.Config
are different and then I'm picking one. I don't think I'm wrong to
expect that these different variables are in sync. I'm also of the view
that if one is not running under C++11+ it's not even necessary to run
the test_forward_list since that header is not expected to be defined by
earlier versions.

Again, I'm sort of a loss here.

Robert Ramey

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at