[Bug libstdc++/105281] status of constexpr <cmath> and <cstdlib> for c++23

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 30 13:00:20 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105281

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks for the survey!

(In reply to Jiang An from comment #2)
> constexpr in C++23, lack constexpr (for some overloads) in libstdc++:
> abs
> modf
> remquo
> frexp

Also imaxabs and imaxdiv, assuming https://cplusplus.github.io/LWG/issue3834
gets approved.

These are handled by the front-end though, so they work in constexpr anyway.
Even if we add constexpr to the additional overloads in <cmath>, it won't be
present on ::modf(double) which is declared in libc and added to namespace std
with a using-declaration.

The implicit constexpr added by the front-end only works if you use don't use
-fno-builtin


More information about the Gcc-bugs mailing list