|
Boost : |
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2021-02-25 22:04:33
On 2/26/21 12:15 AM, Robert Ramey via Boost wrote:
> On 2/25/21 12:48 PM, Gavin Lambert via Boost wrote:
>
>> Conditioning a boost test on boost version < N is equivalent to just
>> unconditionally suppressing it, no?
>
> No - because boost version <= 1.75 math library supports C++03 while
> other versions don't/wont.
I think the point was that with the Boost version check you won't be
running these tests *at all* in the current and future Boost.
>> Isn't the goal to only suppress it when not compiling >= C++11?
> yep
>
>> Shouldn't you just check __cplusplus >= 201103 for that?
>
> Hmmm - is this portable on all compilers? Is this part of config.hpp?
__cplusplus is a standard C++ macro, but not all compilers consistently
define it to >= 201103 in C++11 mode. Most notably, MSVC doesn't.
If you want to check macros (which is what I'm doing in Boost.Integer to
solve a similar problem with Boost.Multiprecision) then I'd suggest to
check Boost.Config macros for the particular C++11 features that are
required by Boost.Math. You may even peek in Boost.Math sources to see
what these macros are, if they are checked there.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk