Boost logo

Boost :

Subject: Re: [boost] [math] mark constants as constexpr
From: John Maddock (jz.maddock_at_[hidden])
Date: 2017-08-21 09:09:16

On 21/08/2017 06:33, Lakshay Garg via Boost wrote:
> Hello all
> The boost.math library stores quite a few constants for improving
> performance of various operations (example:
> boost/math/special_functions/detail/unchecked_factorial.hpp). I was
> wondering if marking these constants as constexpr would be desirable.
> Please provide feedback / suggestions so that I can get started :)

PR's would be welcome as ever ;)

We did make everything in boost::math::constants:: constexpr but missed
those - the 3 main candidates are the tables of prime numbers, bernoulli
numbers and factorials. Some of them may need C++14 constexpr rather
than the vanilla C++11 version. We have BOOST_CXX14_CONSTEXPR and
BOOST_CONSTEXPR for marking this stuff up in a backwards compatible way
BTW. Tests and docs will need updating as well. The unchecked_
functions can probably be noexcept as well.

Thanks! John.|

This email has been checked for viruses by AVG.

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