[libcxx-commits] [libcxx] [libc++] math: remove unused template (PR #91074)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 4 10:22:05 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Andrew Sukach (soukatch)
<details>
<summary>Changes</summary>
Nothing huge. I noticed while reading through the code that the double overload for fabs has an unused template, so I removed it.
---
Full diff: https://github.com/llvm/llvm-project/pull/91074.diff
1 Files Affected:
- (modified) libcxx/include/__math/abs.h (+1-4)
``````````diff
diff --git a/libcxx/include/__math/abs.h b/libcxx/include/__math/abs.h
index ab82a2800f53c9..f3dfd711a1d5f9 100644
--- a/libcxx/include/__math/abs.h
+++ b/libcxx/include/__math/abs.h
@@ -25,10 +25,7 @@ namespace __math {
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI float fabs(float __x) _NOEXCEPT { return __builtin_fabsf(__x); }
-template <class = int>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI double fabs(double __x) _NOEXCEPT {
- return __builtin_fabs(__x);
-}
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI double fabs(double __x) _NOEXCEPT { return __builtin_fabs(__x); }
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI long double fabs(long double __x) _NOEXCEPT {
return __builtin_fabsl(__x);
``````````
</details>
https://github.com/llvm/llvm-project/pull/91074
More information about the libcxx-commits
mailing list