Boost logo

Boost :

Subject: Re: [boost] [config][mpl][type_traits][integer] BOOST_STATIC_CONSTANT should use constexpr
From: John Maddock (boost.regex_at_[hidden])
Date: 2013-04-22 13:07:09

> Deprecating BOOST_STATIC_CONSTANT macro (and removing it in future
> releases) will cause a lot of code changes in existing Boosts and
> users projects.

I'm not suggesting we remove it, just mark it as "don't use in new code" and
provide patches for library authors to switch to the new macro.

> I still think that making BOOST_STATIC_CONSTANT macro to use constexpr
> by default will cause less troubles and code changes.

You can't do that without substantial code changes in library (and possibly
user) code, because the out-of-line definition needed changes. So you would
have to change both the macro, and many uses of it all at once, manage
merging all that to release, and deal with angry users wondering why their
code has suddenly broken. I accept not all uses of BOOST_STATIC_CONSTANT
provide an out-of-line definition, but they probably should. IMO such a
change is a non-starter.


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