Boost logo

Boost :

Subject: Re: [boost] [config] BOOST_STATIC_CONSTEXPR in C++11 vs C++14
From: Lakshay Garg (lakshayg373_at_[hidden])
Date: 2017-08-22 18:12:08

On 22 August 2017 at 23:33, John Maddock via Boost
<boost_at_[hidden]> wrote:
> On 22/08/2017 17:18, Gary Furnish via Boost wrote:
>> I'd take a look at making something like BOOST_CONSTEXPR_AND_CONST
>> See
>> But I'd name it something like BOOST_COMPILETIME_CONSTANT because
>> BOOST_CONSTEXPR_AND_CONST would seem to imply always constexpr and
>> const, which is not what you want. Really though you want to get
>> other people who are more knowledgeable then I am involved if you want
>> to add a cross-library macro, so maybe make one for your use case to
>> test it.
> Actually I think it's a lot simpler than this: when it was added,
> |BOOST_CONSTEXPR_OR_CONST did what it says, and what it's documented to do -
> namely declare something const or constexpr (which implied const at the
> time). Subsequently it's been broken by C++14 where constexpr no longer
> implies const. It just needs updating is all, and fixing that will

But if we continue to call it BOOST_CONSTEXPR_OR_CONST, it would mean
something that is not compliant with the C++14 standard. Shouldn't we have
another macro, very similar to BOOST_CONSTEXPR_OR_CONST, just handling
the case for C++14 in a different manner.


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