diff --git a/libcxx/include/__math/abs.h b/libcxx/include/__math/abs.h --- a/libcxx/include/__math/abs.h +++ b/libcxx/include/__math/abs.h @@ -34,9 +34,8 @@ return __builtin_fabsl(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -fabs(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double fabs(_A1 __x) _NOEXCEPT { return __builtin_fabs((double)__x); } diff --git a/libcxx/include/__math/copysign.h b/libcxx/include/__math/copysign.h --- a/libcxx/include/__math/copysign.h +++ b/libcxx/include/__math/copysign.h @@ -33,10 +33,8 @@ return ::__builtin_copysignl(__x, __y); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - copysign(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type copysign(_A1 __x, _A2 __y) _NOEXCEPT { return ::__builtin_copysign(__x, __y); } diff --git a/libcxx/include/__math/error_functions.h b/libcxx/include/__math/error_functions.h --- a/libcxx/include/__math/error_functions.h +++ b/libcxx/include/__math/error_functions.h @@ -32,8 +32,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double erf(long double __x) _NOEXCEPT { return __builtin_erfl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type erf(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double erf(_A1 __x) _NOEXCEPT { return __builtin_erf((double)__x); } @@ -48,8 +48,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double erfc(long double __x) _NOEXCEPT { return __builtin_erfcl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type erfc(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double erfc(_A1 __x) _NOEXCEPT { return __builtin_erfc((double)__x); } diff --git a/libcxx/include/__math/exponential_functions.h b/libcxx/include/__math/exponential_functions.h --- a/libcxx/include/__math/exponential_functions.h +++ b/libcxx/include/__math/exponential_functions.h @@ -35,8 +35,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double exp(long double __x) _NOEXCEPT { return __builtin_expl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type exp(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double exp(_A1 __x) _NOEXCEPT { return __builtin_exp((double)__x); } @@ -53,9 +53,8 @@ return __builtin_frexpl(__x, __e); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -frexp(_A1 __x, int* __e) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double frexp(_A1 __x, int* __e) _NOEXCEPT { return __builtin_frexp((double)__x, __e); } @@ -72,9 +71,8 @@ return __builtin_ldexpl(__x, __e); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -ldexp(_A1 __x, int __e) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double ldexp(_A1 __x, int __e) _NOEXCEPT { return __builtin_ldexp((double)__x, __e); } @@ -89,8 +87,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double exp2(long double __x) _NOEXCEPT { return __builtin_exp2l(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type exp2(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double exp2(_A1 __x) _NOEXCEPT { return __builtin_exp2((double)__x); } @@ -105,8 +103,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double expm1(long double __x) _NOEXCEPT { return __builtin_expm1l(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type expm1(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double expm1(_A1 __x) _NOEXCEPT { return __builtin_expm1((double)__x); } @@ -123,9 +121,8 @@ return __builtin_scalblnl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -scalbln(_A1 __x, long __y) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double scalbln(_A1 __x, long __y) _NOEXCEPT { return __builtin_scalbln((double)__x, __y); } @@ -142,9 +139,8 @@ return __builtin_scalbnl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -scalbn(_A1 __x, int __y) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double scalbn(_A1 __x, int __y) _NOEXCEPT { return __builtin_scalbn((double)__x, __y); } @@ -161,10 +157,8 @@ return __builtin_powl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - pow(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type pow(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::pow((__result_type)__x, (__result_type)__y); diff --git a/libcxx/include/__math/fdim.h b/libcxx/include/__math/fdim.h --- a/libcxx/include/__math/fdim.h +++ b/libcxx/include/__math/fdim.h @@ -34,10 +34,8 @@ return __builtin_fdiml(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - fdim(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type fdim(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::fdim((__result_type)__x, (__result_type)__y); diff --git a/libcxx/include/__math/fma.h b/libcxx/include/__math/fma.h --- a/libcxx/include/__math/fma.h +++ b/libcxx/include/__math/fma.h @@ -36,11 +36,11 @@ return __builtin_fmal(__x, __y, __z); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, - __promote<_A1, _A2, _A3> >::type - fma(_A1 __x, _A2 __y, _A3 __z) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2, _A3>::type fma(_A1 __x, _A2 __y, _A3 __z) _NOEXCEPT { typedef typename __promote<_A1, _A2, _A3>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value && _IsSame<_A3, __result_type>::value)), diff --git a/libcxx/include/__math/gamma.h b/libcxx/include/__math/gamma.h --- a/libcxx/include/__math/gamma.h +++ b/libcxx/include/__math/gamma.h @@ -32,8 +32,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double lgamma(long double __x) _NOEXCEPT { return __builtin_lgammal(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type lgamma(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double lgamma(_A1 __x) _NOEXCEPT { return __builtin_lgamma((double)__x); } @@ -50,8 +50,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double tgamma(long double __x) _NOEXCEPT { return __builtin_tgammal(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type tgamma(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double tgamma(_A1 __x) _NOEXCEPT { return __builtin_tgamma((double)__x); } diff --git a/libcxx/include/__math/hyperbolic_functions.h b/libcxx/include/__math/hyperbolic_functions.h --- a/libcxx/include/__math/hyperbolic_functions.h +++ b/libcxx/include/__math/hyperbolic_functions.h @@ -32,8 +32,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double cosh(long double __x) _NOEXCEPT { return __builtin_coshl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type cosh(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double cosh(_A1 __x) _NOEXCEPT { return __builtin_cosh((double)__x); } @@ -48,8 +48,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double sinh(long double __x) _NOEXCEPT { return __builtin_sinhl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type sinh(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double sinh(_A1 __x) _NOEXCEPT { return __builtin_sinh((double)__x); } @@ -64,8 +64,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double tanh(long double __x) _NOEXCEPT { return __builtin_tanhl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type tanh(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double tanh(_A1 __x) _NOEXCEPT { return __builtin_tanh((double)__x); } diff --git a/libcxx/include/__math/hypot.h b/libcxx/include/__math/hypot.h --- a/libcxx/include/__math/hypot.h +++ b/libcxx/include/__math/hypot.h @@ -34,10 +34,8 @@ return __builtin_hypotl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - hypot(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type hypot(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::hypot((__result_type)__x, (__result_type)__y); diff --git a/libcxx/include/__math/inverse_hyperbolic_functions.h b/libcxx/include/__math/inverse_hyperbolic_functions.h --- a/libcxx/include/__math/inverse_hyperbolic_functions.h +++ b/libcxx/include/__math/inverse_hyperbolic_functions.h @@ -32,8 +32,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double acosh(long double __x) _NOEXCEPT { return __builtin_acoshl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type acosh(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double acosh(_A1 __x) _NOEXCEPT { return __builtin_acosh((double)__x); } @@ -48,8 +48,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double asinh(long double __x) _NOEXCEPT { return __builtin_asinhl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type asinh(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double asinh(_A1 __x) _NOEXCEPT { return __builtin_asinh((double)__x); } @@ -64,8 +64,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double atanh(long double __x) _NOEXCEPT { return __builtin_atanhl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type atanh(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double atanh(_A1 __x) _NOEXCEPT { return __builtin_atanh((double)__x); } diff --git a/libcxx/include/__math/inverse_trigonometric_functions.h b/libcxx/include/__math/inverse_trigonometric_functions.h --- a/libcxx/include/__math/inverse_trigonometric_functions.h +++ b/libcxx/include/__math/inverse_trigonometric_functions.h @@ -35,8 +35,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double acos(long double __x) _NOEXCEPT { return __builtin_acosl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type acos(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double acos(_A1 __x) _NOEXCEPT { return __builtin_acos((double)__x); } @@ -51,8 +51,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double asin(long double __x) _NOEXCEPT { return __builtin_asinl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type asin(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double asin(_A1 __x) _NOEXCEPT { return __builtin_asin((double)__x); } @@ -67,8 +67,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double atan(long double __x) _NOEXCEPT { return __builtin_atanl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type atan(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double atan(_A1 __x) _NOEXCEPT { return __builtin_atan((double)__x); } @@ -85,10 +85,8 @@ return __builtin_atan2l(__y, __x); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - atan2(_A1 __y, _A2 __x) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type atan2(_A1 __y, _A2 __x) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::atan2((__result_type)__y, (__result_type)__x); diff --git a/libcxx/include/__math/logarithms.h b/libcxx/include/__math/logarithms.h --- a/libcxx/include/__math/logarithms.h +++ b/libcxx/include/__math/logarithms.h @@ -32,8 +32,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double log(long double __x) _NOEXCEPT { return __builtin_logl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type log(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double log(_A1 __x) _NOEXCEPT { return __builtin_log((double)__x); } @@ -48,8 +48,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double log10(long double __x) _NOEXCEPT { return __builtin_log10l(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type log10(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double log10(_A1 __x) _NOEXCEPT { return __builtin_log10((double)__x); } @@ -64,8 +64,8 @@ inline _LIBCPP_HIDE_FROM_ABI int ilogb(long double __x) _NOEXCEPT { return __builtin_ilogbl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, int>::type ilogb(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI int ilogb(_A1 __x) _NOEXCEPT { return __builtin_ilogb((double)__x); } @@ -80,8 +80,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double log1p(long double __x) _NOEXCEPT { return __builtin_log1pl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type log1p(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double log1p(_A1 __x) _NOEXCEPT { return __builtin_log1p((double)__x); } @@ -96,8 +96,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double log2(long double __x) _NOEXCEPT { return __builtin_log2l(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type log2(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double log2(_A1 __x) _NOEXCEPT { return __builtin_log2((double)__x); } @@ -112,8 +112,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double logb(long double __x) _NOEXCEPT { return __builtin_logbl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type logb(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double logb(_A1 __x) _NOEXCEPT { return __builtin_logb((double)__x); } diff --git a/libcxx/include/__math/min_max.h b/libcxx/include/__math/min_max.h --- a/libcxx/include/__math/min_max.h +++ b/libcxx/include/__math/min_max.h @@ -38,10 +38,8 @@ return __builtin_fmaxl(__x, __y); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - fmax(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type fmax(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::fmax((__result_type)__x, (__result_type)__y); @@ -62,10 +60,8 @@ return __builtin_fminl(__x, __y); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - fmin(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type fmin(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::fmin((__result_type)__x, (__result_type)__y); diff --git a/libcxx/include/__math/modulo.h b/libcxx/include/__math/modulo.h --- a/libcxx/include/__math/modulo.h +++ b/libcxx/include/__math/modulo.h @@ -36,10 +36,8 @@ return __builtin_fmodl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - fmod(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type fmod(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::fmod((__result_type)__x, (__result_type)__y); diff --git a/libcxx/include/__math/remainder.h b/libcxx/include/__math/remainder.h --- a/libcxx/include/__math/remainder.h +++ b/libcxx/include/__math/remainder.h @@ -37,10 +37,8 @@ return __builtin_remainderl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - remainder(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type remainder(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::remainder((__result_type)__x, (__result_type)__y); @@ -61,10 +59,8 @@ return __builtin_remquol(__x, __y, __z); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - remquo(_A1 __x, _A2 __y, int* __z) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type remquo(_A1 __x, _A2 __y, int* __z) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::remquo((__result_type)__x, (__result_type)__y, __z); diff --git a/libcxx/include/__math/roots.h b/libcxx/include/__math/roots.h --- a/libcxx/include/__math/roots.h +++ b/libcxx/include/__math/roots.h @@ -32,8 +32,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double sqrt(long double __x) _NOEXCEPT { return __builtin_sqrtl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type sqrt(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double sqrt(_A1 __x) _NOEXCEPT { return __builtin_sqrt((double)__x); } @@ -50,9 +50,8 @@ return __builtin_cbrtl(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -cbrt(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double cbrt(_A1 __x) _NOEXCEPT { return __builtin_cbrt((double)__x); } diff --git a/libcxx/include/__math/rounding_functions.h b/libcxx/include/__math/rounding_functions.h --- a/libcxx/include/__math/rounding_functions.h +++ b/libcxx/include/__math/rounding_functions.h @@ -37,9 +37,8 @@ return __builtin_ceill(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -ceil(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double ceil(_A1 __x) _NOEXCEPT { return __builtin_ceil((double)__x); } @@ -56,9 +55,8 @@ return __builtin_floorl(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -floor(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double floor(_A1 __x) _NOEXCEPT { return __builtin_floor((double)__x); } @@ -73,8 +71,8 @@ inline _LIBCPP_HIDE_FROM_ABI long long llrint(long double __x) _NOEXCEPT { return __builtin_llrintl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, long long>::type llrint(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI long long llrint(_A1 __x) _NOEXCEPT { return __builtin_llrint((double)__x); } @@ -89,8 +87,8 @@ inline _LIBCPP_HIDE_FROM_ABI long long llround(long double __x) _NOEXCEPT { return __builtin_llroundl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, long long>::type llround(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI long long llround(_A1 __x) _NOEXCEPT { return __builtin_llround((double)__x); } @@ -105,8 +103,8 @@ inline _LIBCPP_HIDE_FROM_ABI long lrint(long double __x) _NOEXCEPT { return __builtin_lrintl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, long>::type lrint(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI long lrint(_A1 __x) _NOEXCEPT { return __builtin_lrint((double)__x); } @@ -121,8 +119,8 @@ inline _LIBCPP_HIDE_FROM_ABI long lround(long double __x) _NOEXCEPT { return __builtin_lroundl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, long>::type lround(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI long lround(_A1 __x) _NOEXCEPT { return __builtin_lround((double)__x); } @@ -141,9 +139,8 @@ return __builtin_nearbyintl(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -nearbyint(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double nearbyint(_A1 __x) _NOEXCEPT { return __builtin_nearbyint((double)__x); } @@ -160,10 +157,8 @@ return __builtin_nextafterl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI - typename __enable_if_t< is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, __promote<_A1, _A2> >::type - nextafter(_A1 __x, _A2 __y) _NOEXCEPT { +template ::value && is_arithmetic<_A2>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI __promote<_A1, _A2>::type nextafter(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename __promote<_A1, _A2>::type __result_type; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); return __math::nextafter((__result_type)__x, (__result_type)__y); @@ -184,9 +179,8 @@ return __builtin_nexttowardl(__x, __y); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -nexttoward(_A1 __x, long double __y) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double nexttoward(_A1 __x, long double __y) _NOEXCEPT { return __builtin_nexttoward((double)__x, __y); } @@ -203,9 +197,8 @@ return __builtin_rintl(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -rint(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double rint(_A1 __x) _NOEXCEPT { return __builtin_rint((double)__x); } @@ -222,9 +215,8 @@ return __builtin_roundl(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -round(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double round(_A1 __x) _NOEXCEPT { return __builtin_round((double)__x); } @@ -241,9 +233,8 @@ return __builtin_truncl(__x); } -template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type -trunc(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double trunc(_A1 __x) _NOEXCEPT { return __builtin_trunc((double)__x); } diff --git a/libcxx/include/__math/traits.h b/libcxx/include/__math/traits.h --- a/libcxx/include/__math/traits.h +++ b/libcxx/include/__math/traits.h @@ -62,10 +62,8 @@ return __builtin_isinf((typename __promote<_A1>::type)__x); } -template -_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI - typename enable_if< is_arithmetic<_A1>::value && !numeric_limits<_A1>::has_infinity, bool>::type - isinf(_A1) _NOEXCEPT { +template ::value && !numeric_limits<_A1>::has_infinity, int> = 0> +_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(_A1) _NOEXCEPT { return false; } diff --git a/libcxx/include/__math/trigonometric_functions.h b/libcxx/include/__math/trigonometric_functions.h --- a/libcxx/include/__math/trigonometric_functions.h +++ b/libcxx/include/__math/trigonometric_functions.h @@ -32,8 +32,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double cos(long double __x) _NOEXCEPT { return __builtin_cosl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type cos(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double cos(_A1 __x) _NOEXCEPT { return __builtin_cos((double)__x); } @@ -48,8 +48,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double sin(long double __x) _NOEXCEPT { return __builtin_sinl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type sin(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double sin(_A1 __x) _NOEXCEPT { return __builtin_sin((double)__x); } @@ -64,8 +64,8 @@ inline _LIBCPP_HIDE_FROM_ABI long double tan(long double __x) _NOEXCEPT { return __builtin_tanl(__x); } -template -inline _LIBCPP_HIDE_FROM_ABI typename enable_if::value, double>::type tan(_A1 __x) _NOEXCEPT { +template ::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI double tan(_A1 __x) _NOEXCEPT { return __builtin_tan((double)__x); }