[PATCH] D134136: [Clang] Support constexpr for builtin fmax, fmin, ilogb, logb, scalbn
Evgeny Shulgin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 18 07:29:07 PDT 2022
Izaron added a comment.
libc++ doesn't support constexpr-related patches from C++20 in `<complex>`: see issue https://github.com/llvm/llvm-project/issues/55370
I reviewed the code in `<complex>` and found out that since we use a dozen of math functions, we need to support more constexpr builtin math function.
I implemented constexpr versions for five functions. This will be enough to implement a 2017 paper: https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2017/p0415r1.html (in a new pull request)
(Also there is a 2019 paper with more constexpr functions for `<complex>`: https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1383r0.pdf)
Also builtin implementations will be useful for new C++23 constexpr functions: for example https://en.cppreference.com/w/cpp/numeric/math/scalbn
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134136/new/
https://reviews.llvm.org/D134136
More information about the cfe-commits
mailing list