Subject: Re: [boost] constexpr, cmath functions and other functions and distributions
From: Beman Dawes (bdawes_at_[hidden])
Date: 2016-07-29 09:07:10
On Thu, Jul 28, 2016 at 11:44 AM, Antony Polukhin <antoshkka_at_[hidden]>
> 2016-07-28 16:24 GMT+03:00 Paul A. Bristow <pbristow_at_[hidden]>:
> > Is there any support for making std::abs and friends constexpr where
> > possible in future versions of the C++ Standard?
> Here are the bad news: C++ committee wishes to keep it possible for the
> implementors of the Standard Library to reuse C headers.
> I've tried to add constexpr to the <cstring> in
> The committee sad 'No', so I've removed the changes to <cstring> and only
> then the paper passed into C++Next.
> There is a small chance that a paper on making some of the C math functions
> constexpr may be accepted if functions are trivial to implement
The chance of that happening is much increased if there are National Body
comments to the C++17 ballot requesting constexpr C math functions.
So Paul should file a comment with the BSI (Roger Orr, IIRC), and anyone
else who cares should file a comment with their National Body.
> I can write such paper and represent in to the C++ committee, but I'll need
> a lot of help with:
> * writing a list of C functions that could be simply implemented from
> scratch without affecting performance (functions that usually take 1-3
> lines to implement).
> * implementing each of those function using constexpr
Having such a paper also would increase the chance that the C++ committee
> At least users will have the constexpr implementation in Boost.Math if the
> paper won't be accepted.
Again, the fact that Boost.Math has implemented such constexpr functions
increases the chance that the committee will add them to the standard.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk