Re: Future support of constexpr math functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 14 Feb 2020, Florian Weimer wrote:

* Jonathan Wakely:

I think it's very unlikely that constexpr support will decrease. The
trend has been in the opposite direction, to make every function in
the standard library usable in constant expressions. I heard a
suggestion to require implementations to add constexpr to <cmath>
functions just the other day.

Many of these functions depend on global state such as the rounding
mode.

So does a+b for floating point numbers.
When the user is explicitly asking for constexpr, accepting to evaluate all those in the default rounding mode and without exceptions sounds ok. Doing it eagerly (say when initializing a non-constexpr variable) is a different story. It may also depend on -frounding-math, even if the standard doesn't like it when constexpr-ness varies.

--
Marc Glisse



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux