[libcxx-commits] [libcxx] [libc++][math] Provide overloads for cv-unqualified floating point types for `std::signbit` (PR #106566)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 11 01:04:47 PDT 2024
================
@@ -34,8 +34,30 @@ namespace __math {
# define _LIBCPP_SIGNBIT_CONSTEXPR
#endif
-template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
-_LIBCPP_NODISCARD inline _LIBCPP_SIGNBIT_CONSTEXPR _LIBCPP_HIDE_FROM_ABI bool signbit(_A1 __x) _NOEXCEPT {
+_LIBCPP_NODISCARD inline _LIBCPP_SIGNBIT_CONSTEXPR _LIBCPP_HIDE_FROM_ABI
+#ifdef _LIBCPP_PREFERRED_OVERLOAD
+_LIBCPP_PREFERRED_OVERLOAD
+#endif
----------------
philnik777 wrote:
I meant that we can instead add `template <class = void>` to make the overloads weaker than the UCRT overloads. Is there any reason not to do that?
https://github.com/llvm/llvm-project/pull/106566
More information about the libcxx-commits
mailing list