Boost logo

Boost :

Subject: Re: [boost] [math] mark constants as constexpr
From: Lakshay Garg (lakshayg373_at_[hidden])
Date: 2017-08-21 09:11:39


On 21 August 2017 at 14:39, John Maddock via Boost <boost_at_[hidden]>
wrote:

> 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.|
> |
>
>
​Thanks for the suggestions! I will send in a PR in a day or two.


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