mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
[libc++][NFC] Replace typedefs with using in the math headers
Reviewed By: #libc, Mordante, ldionne Spies: Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D155382
This commit is contained in:
parent
c96cba3aea
commit
dcdcc7c804
@ -159,7 +159,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double pow(long double __x, long double __y) _
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type pow(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::pow((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double fdim(long double __x, long double __y)
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fdim(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::fdim((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ template <class _A1,
|
||||
class _A3,
|
||||
__enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2, _A3>::type fma(_A1 __x, _A2 __y, _A3 __z) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2, _A3>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2, _A3>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value &&
|
||||
_IsSame<_A3, __result_type>::value)),
|
||||
"");
|
||||
|
@ -36,7 +36,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y)
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type hypot(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::hypot((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double atan2(long double __y, long double __x)
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type atan2(_A1 __y, _A2 __x) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::atan2((__result_type)__y, (__result_type)__x);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double fmax(long double
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmax(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::fmax((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
@ -62,7 +62,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double fmin(long double
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmin(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::fmin((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double fmod(long double __x, long double __y)
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmod(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::fmod((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double remainder(long double __x, long double
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remainder(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::remainder((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
@ -61,7 +61,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double remquo(long double __x, long double __y
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remquo(_A1 __x, _A2 __y, int* __z) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::remquo((__result_type)__x, (__result_type)__y, __z);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double nextafter(long double __x, long double
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type nextafter(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type __result_type;
|
||||
using __result_type = typename __promote<_A1, _A2>::type;
|
||||
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
|
||||
return __math::nextafter((__result_type)__x, (__result_type)__y);
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool i
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isgreater(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type type;
|
||||
using type = typename __promote<_A1, _A2>::type;
|
||||
return __builtin_isgreater((type)__x, (type)__y);
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isgreater(_A1 __x, _A2 _
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isgreaterequal(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type type;
|
||||
using type = typename __promote<_A1, _A2>::type;
|
||||
return __builtin_isgreaterequal((type)__x, (type)__y);
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isgreaterequal(_A1 __x,
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isless(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type type;
|
||||
using type = typename __promote<_A1, _A2>::type;
|
||||
return __builtin_isless((type)__x, (type)__y);
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isless(_A1 __x, _A2 __y)
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool islessequal(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type type;
|
||||
using type = typename __promote<_A1, _A2>::type;
|
||||
return __builtin_islessequal((type)__x, (type)__y);
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool islessequal(_A1 __x, _A2
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool islessgreater(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type type;
|
||||
using type = typename __promote<_A1, _A2>::type;
|
||||
return __builtin_islessgreater((type)__x, (type)__y);
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool islessgreater(_A1 __x, _
|
||||
|
||||
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isunordered(_A1 __x, _A2 __y) _NOEXCEPT {
|
||||
typedef typename __promote<_A1, _A2>::type type;
|
||||
using type = typename __promote<_A1, _A2>::type;
|
||||
return __builtin_isunordered((type)__x, (type)__y);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user