Boost logo

Boost :

Subject: Re: [boost] [config] BOOST_STATIC_CONSTEXPR in C++11 vs C++14
From: John Maddock (jz.maddock_at_[hidden])
Date: 2017-08-22 18:03:31

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 automatically fix ||BOOST_STATIC_CONSTEXPR as well. See|

This email has been checked for viruses by AVG.

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