[libcxx-commits] [libcxx] [libc++][math] Add `constexpr` to `std::fmax()` and `std::fmin()` (PR #222953)
Atharva Potdar via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Sep 13 00:29:07 PDT 2026
================
@@ -9,6 +9,12 @@
#ifndef _LIBCPP___MATH_MIN_MAX_H
#define _LIBCPP___MATH_MIN_MAX_H
+#if __has_constexpr_builtin(__builtin_fmax) || defined(_LIBCPP_COMPILER_GCC)
----------------
atharva-potdar wrote:
Is this it? Additionally, some of the checks in `libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-gcc.pass.cpp` were already changed to `ASSERT_CONSTEXPR_CXX23`, that is why I went ahead with the PR. I've made it a draft until I figure out why CI is failing. If `__builtin_fmax` is not yet constexpr, I will close the PR.
https://github.com/llvm/llvm-project/blob/8ea78db3c1bf6522ccaf6d75e73a03d80f08a00b/clang/lib/AST/ExprConstant.cpp#L20620-L20644
https://github.com/llvm/llvm-project/pull/222953
More information about the libcxx-commits
mailing list