[libcxx-commits] [libcxx] f7b8f72 - [libc++][math.h] Remove unnecessary uses of __promote
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 27 16:05:52 PDT 2022
Author: Nikolas Klauser
Date: 2022-10-28T01:05:47+02:00
New Revision: f7b8f7273b0e34e493ce40ccd4b60795a4260408
URL: https://github.com/llvm/llvm-project/commit/f7b8f7273b0e34e493ce40ccd4b60795a4260408
DIFF: https://github.com/llvm/llvm-project/commit/f7b8f7273b0e34e493ce40ccd4b60795a4260408.diff
LOG: [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
Added:
Modified:
libcxx/include/math.h
Removed:
################################################################################
diff --git a/libcxx/include/math.h b/libcxx/include/math.h
index ac57360cca9ec..d5a7095a596ae 100644
--- a/libcxx/include/math.h
+++ b/libcxx/include/math.h
@@ -333,7 +333,7 @@ inline _LIBCPP_HIDE_FROM_ABI
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 @@ inline _LIBCPP_HIDE_FROM_ABI
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 @@ inline _LIBCPP_HIDE_FROM_ABI
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 @@ inline _LIBCPP_HIDE_FROM_ABI
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 @@ inline _LIBCPP_HIDE_FROM_ABI
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 @@ inline _LIBCPP_HIDE_FROM_ABI
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>
More information about the libcxx-commits
mailing list