[libc++][math.h] Remove unnecessary uses of __promote
Removes __promote when it's just the identity.
Reviewed By: ldionne, #libc
Spies: libcxx-commits, michaelplatings
Differential Revision: https://reviews.llvm.org/D136868
NOKEYCHECK=True
GitOrigin-RevId: f7b8f7273b0e34e493ce40ccd4b60795a4260408
diff --git a/include/math.h b/include/math.h
index ac57360..d5a7095 100644
--- a/include/math.h
+++ b/include/math.h
@@ -333,7 +333,7 @@
typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
signbit(_A1 __x) _NOEXCEPT
{
- return __libcpp_signbit((typename std::__promote<_A1>::type)__x);
+ return __libcpp_signbit(__x);
}
template <class _A1>
@@ -357,7 +357,7 @@
typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
signbit(_A1 __x) _NOEXCEPT
{
- return ::signbit(static_cast<typename std::__promote<_A1>::type>(__x));
+ return ::signbit(__x);
}
template <class _A1>
@@ -400,7 +400,7 @@
typename std::enable_if<std::is_floating_point<_A1>::value, int>::type
fpclassify(_A1 __x) _NOEXCEPT
{
- return __libcpp_fpclassify((typename std::__promote<_A1>::type)__x);
+ return __libcpp_fpclassify(__x);
}
template <class _A1>
@@ -416,7 +416,7 @@
typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
fpclassify(_A1 __x) _NOEXCEPT
{
- return ::fpclassify(static_cast<typename std::__promote<_A1>::type>(__x));
+ return ::fpclassify(__x);
}
template <class _A1>
@@ -540,7 +540,7 @@
typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
isnan(_A1 __x) _NOEXCEPT
{
- return __libcpp_isnan((typename std::__promote<_A1>::type)__x);
+ return __libcpp_isnan(__x);
}
template <class _A1>
@@ -588,7 +588,7 @@
typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
isnormal(_A1 __x) _NOEXCEPT
{
- return __libcpp_isnormal((typename std::__promote<_A1>::type)__x);
+ return __libcpp_isnormal(__x);
}
template <class _A1>