[libcxx-commits] [libcxx] [libc++] Tweak comments for workaround about `fpclassify` overloads (PR #212388)

Lucas Mellone via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 28 00:46:21 PDT 2026


================
@@ -387,6 +387,12 @@ namespace __math {
 
 // fpclassify
 
+// MS UCRT provides non-template fpclassify overloads for float, double, and long double that are unconditionally
+// non-constexpr.
+// To workaround this, we use _LIBCPP_PREFERRED_OVERLOAD to make our overloads stronger those overloads, which is
+// necessary for constexpr addition in C++23. When _LIBCPP_PREFERRED_OVERLOAD is not supported, we use template
+// overloads as workaround to avoid conflicts.
----------------
lknknm wrote:

```suggestion
// To workaround this, we use _LIBCPP_PREFERRED_OVERLOAD to make our overloads stronger than those overloads, which is
// necessary for constexpr addition in C++23. When _LIBCPP_PREFERRED_OVERLOAD is not supported, we use template
// overloads as a workaround to avoid conflicts.
```

https://github.com/llvm/llvm-project/pull/212388


More information about the libcxx-commits mailing list