Boost logo

Boost :

Subject: Re: [boost] [config][mpl][type_traits][integer] BOOST_STATIC_CONSTANT should use constexpr
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2013-04-22 04:22:37


2013/4/21 John Maddock <boost.regex_at_[hidden]>:
>> I'm not against this radical alternative, and I even like it. I don't know
>> which compilers need the enum workaround and if Boost should support them.
>
>
> The list seems to be:
>
> VC7 and earlier
> Vacpp 5.02 and earlier (currently 11.1)
> Sunpro 5.6 and earlier.
> MPW all versions?

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 still think that making BOOST_STATIC_CONSTANT macro to use constexpr
by default will cause less troubles and code changes. All libraries
will be updated automatically and we'll avoid situation where some
libraries use old macro, some use new macro. User won't be confused by
'oh, can I call operator() at compile time for trait X or not?'. Note
about that change on the title page and in BOOST_STATIC_CONSTANT docs
will help users to adopt changes smooth.

--
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk