|
Boost : |
From: John Maddock (jz.maddock_at_[hidden])
Date: 2021-08-07 07:13:42
On 07/08/2021 05:46, Robert Ramey via Boost wrote:
> On 8/4/21 11:26 AM, John Maddock via Boost wrote:
>> On 04/08/2021 19:05, Robert Ramey via Boost wrote:
>
>> Actually there is a roll for Boost.Config here:
>> std::is_constant_evaluated is valid in C++20 mode only, as is it's
>> feature detection macro. However, the underlying compiler intrinsic
>> works just fine all the way back to C++11 mode as long as the
>> compiler has implemented it.
>>
>> Multiprecision has the logic for this already:
>> https://github.com/boostorg/multiprecision/blob/dd4d566055ff6eee6006f8f954efd3035bdf442a/include/boost/multiprecision/detail/number_base.hpp#L96-L132
>> albeit somewhat complexified because it uses __builtin_constant_p to
>> approximate std::is_constant_evaluated on older gcc versions.
>
> This looks what I w was looking for. Is there any chance to get this
> moved into Boost.Config ? I think it would be even better than what I
> was looking for.
Yes, just give me a few days I'm tied up right now, John.
-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk