diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2016-11-21 16:09:47 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2016-11-21 16:09:47 +0000 |
commit | 3115f94f7fe0388f026837b36d165b026032093e (patch) | |
tree | 8f502695fd5b7d4aade9b6b924f17b355a3f0403 /libstdc++-v3/include/c_global | |
parent | 6fce0013981ae41c0b44baa4cd59904ff5762bfc (diff) | |
download | gcc-3115f94f7fe0388f026837b36d165b026032093e.zip gcc-3115f94f7fe0388f026837b36d165b026032093e.tar.gz gcc-3115f94f7fe0388f026837b36d165b026032093e.tar.bz2 |
Don't define libstdc++-internal macros in Solaris 10+ <math.h>
libstdc++-v3:
* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Update comments.
(__CORRECT_ISO_CPP11_MATH_H_PROTO): Rename to ...
(__CORRECT_ISO_CPP11_MATH_H_PROTO_FP): ... this.
Add test for C++11 <math.h> integral overloads.
* configure: Regenerate.
* config.h.in: Regenerate.
* include/c_global/cmath [__cplusplus >= 201103L]: Reflect
__CORRECT_ISO_CPP11_MATH_H_PROTO to
__CORRECT_ISO_CPP11_MATH_H_PROTO_FP rename.
* include/c_global/cmath [_GLIBCXX_USE_C99_MATH &&
!_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC && __cplusplus >= 201103L]
(std::fpclassify): Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO_INT.
(std::isfinite): Likewise.
(std::isinf): Likewise.
(std::isnan): Likewise.
(std::isnormal): Likewise.
(std::signbit): Likewise.
(std::isgreater): Likewise.
(std::isgreaterequal): Likewise.
(std::isless): Likewise.
(std::islessequal): Likewise.
(std::islessgreater): Likewise.
(std::isunordered): Likewise.
[__cplusplus >= 201103L && _GLIBCXX_USE_C99_MATH_TR1]
(std::acosh): Likewise.
(std::asinh): Likewise.
(std::atanh): Likewise.
(std::cbrt): Likewise.
(std::copysign): Likewise.
(std::erf): Likewise.
(std::erfc): Likewise.
(std::exp2): Likewise.
(std::expm1): Likewise.
(std::fdim): Likewise.
(std::fma): Likewise.
(std::fmax): Likewise.
(std::fmin): Likewise.
(std::hypot): Likewise.
(std::ilogb): Likewise.
(std::lgamma): Likewise.
(std::llrint): Likewise.
(std::llround): Likewise.
(std::log1p): Likewise.
(std::log2): Likewise.
(std::logb): Likewise.
(std::lrint): Likewise.
(std::lround): Likewise.
(std::nearbyint): Likewise.
(std::nextafter): Likewise.
(std::nexttoward): Likewise.
(std::remainder): Likewise.
(std::remquo): Likewise.
(std::rint): Likewise.
(std::round): Likewise.
(std::scalbln): Likewise.
(std::scalbn): Likewise.
(std::tgamma): Likewise.
(std::trunc): Likewise.
* include/tr1/cmath [_GLIBCXX_USE_C99_MATH_TR1 && __cplusplus >=
201103L]: Reflect __CORRECT_ISO_CPP11_MATH_H_PROTO to
__CORRECT_ISO_CPP11_MATH_H_PROTO_FP rename.
fixincludes:
* inclhack.def (solaris_math_12): New fix.
(hpux11_fabsf): Replace bypass by *-hp-hpux11* mach selector.
* fixincl.x: Regenerate.
* tests/base/math.h [SOLARIS_MATH_12_CHECK]: New test.
From-SVN: r242671
Diffstat (limited to 'libstdc++-v3/include/c_global')
-rw-r--r-- | libstdc++-v3/include/c_global/cmath | 184 |
1 files changed, 138 insertions, 46 deletions
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index 24ce811..bea9b18 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -539,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr int fpclassify(float __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, @@ -556,13 +556,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION FP_SUBNORMAL, FP_ZERO, __x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type fpclassify(_Tp __x) { return __x != 0 ? FP_NORMAL : FP_ZERO; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isfinite(float __x) { return __builtin_isfinite(__x); } @@ -576,13 +578,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isfinite(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isfinite(_Tp __x) { return true; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isinf(float __x) { return __builtin_isinf(__x); } @@ -601,13 +605,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isinf(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isinf(_Tp __x) { return false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isnan(float __x) { return __builtin_isnan(__x); } @@ -626,13 +632,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isnan(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnan(_Tp __x) { return false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isnormal(float __x) { return __builtin_isnormal(__x); } @@ -646,13 +654,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isnormal(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnormal(_Tp __x) { return __x != 0 ? true : false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP // Note: middle-end/36757 is fixed, __builtin_signbit is type-generic. constexpr bool signbit(float __x) @@ -667,13 +677,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_signbit(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type signbit(_Tp __x) { return __x < 0 ? true : false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isgreater(float __x, float __y) { return __builtin_isgreater(__x, __y); } @@ -687,6 +699,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isgreater(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -696,8 +709,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreater(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isgreaterequal(float __x, float __y) { return __builtin_isgreaterequal(__x, __y); } @@ -711,6 +725,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isgreaterequal(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -720,8 +735,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreaterequal(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isless(float __x, float __y) { return __builtin_isless(__x, __y); } @@ -735,6 +751,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isless(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -744,8 +761,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isless(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool islessequal(float __x, float __y) { return __builtin_islessequal(__x, __y); } @@ -759,6 +777,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_islessequal(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -768,8 +787,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessequal(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool islessgreater(float __x, float __y) { return __builtin_islessgreater(__x, __y); } @@ -783,6 +803,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_islessgreater(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -792,8 +813,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessgreater(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isunordered(float __x, float __y) { return __builtin_isunordered(__x, __y); } @@ -807,6 +829,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isunordered(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -816,6 +839,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isunordered(__type(__x), __type(__y)); } +#endif #else @@ -1196,7 +1220,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::truncl; /// Additional overloads. -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float acosh(float __x) { return __builtin_acoshf(__x); } @@ -1206,13 +1230,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_acoshl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acosh(_Tp __x) { return __builtin_acosh(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float asinh(float __x) { return __builtin_asinhf(__x); } @@ -1222,13 +1248,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_asinhl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asinh(_Tp __x) { return __builtin_asinh(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float atanh(float __x) { return __builtin_atanhf(__x); } @@ -1238,13 +1266,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_atanhl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atanh(_Tp __x) { return __builtin_atanh(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float cbrt(float __x) { return __builtin_cbrtf(__x); } @@ -1254,13 +1284,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_cbrtl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cbrt(_Tp __x) { return __builtin_cbrt(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float copysign(float __x, float __y) { return __builtin_copysignf(__x, __y); } @@ -1270,6 +1302,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_copysignl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type copysign(_Tp __x, _Up __y) @@ -1277,8 +1310,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return copysign(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float erf(float __x) { return __builtin_erff(__x); } @@ -1288,13 +1322,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_erfl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erf(_Tp __x) { return __builtin_erf(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float erfc(float __x) { return __builtin_erfcf(__x); } @@ -1304,13 +1340,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_erfcl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erfc(_Tp __x) { return __builtin_erfc(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float exp2(float __x) { return __builtin_exp2f(__x); } @@ -1320,13 +1358,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_exp2l(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp2(_Tp __x) { return __builtin_exp2(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float expm1(float __x) { return __builtin_expm1f(__x); } @@ -1336,13 +1376,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_expm1l(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type expm1(_Tp __x) { return __builtin_expm1(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fdim(float __x, float __y) { return __builtin_fdimf(__x, __y); } @@ -1352,6 +1394,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fdiml(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fdim(_Tp __x, _Up __y) @@ -1359,8 +1402,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fdim(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fma(float __x, float __y, float __z) { return __builtin_fmaf(__x, __y, __z); } @@ -1370,6 +1414,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fmal(__x, __y, __z); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up, typename _Vp> constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type fma(_Tp __x, _Up __y, _Vp __z) @@ -1377,8 +1422,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; return fma(__type(__x), __type(__y), __type(__z)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fmax(float __x, float __y) { return __builtin_fmaxf(__x, __y); } @@ -1388,6 +1434,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fmaxl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmax(_Tp __x, _Up __y) @@ -1395,8 +1442,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmax(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fmin(float __x, float __y) { return __builtin_fminf(__x, __y); } @@ -1406,6 +1454,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fminl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmin(_Tp __x, _Up __y) @@ -1413,8 +1462,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmin(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float hypot(float __x, float __y) { return __builtin_hypotf(__x, __y); } @@ -1424,6 +1474,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_hypotl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type hypot(_Tp __x, _Up __y) @@ -1431,8 +1482,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return hypot(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr int ilogb(float __x) { return __builtin_ilogbf(__x); } @@ -1442,14 +1494,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_ilogbl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type ilogb(_Tp __x) { return __builtin_ilogb(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float lgamma(float __x) { return __builtin_lgammaf(__x); } @@ -1459,13 +1513,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_lgammal(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type lgamma(_Tp __x) { return __builtin_lgamma(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long long llrint(float __x) { return __builtin_llrintf(__x); } @@ -1475,13 +1531,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_llrintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llrint(_Tp __x) { return __builtin_llrint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long long llround(float __x) { return __builtin_llroundf(__x); } @@ -1491,13 +1549,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_llroundl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llround(_Tp __x) { return __builtin_llround(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float log1p(float __x) { return __builtin_log1pf(__x); } @@ -1507,13 +1567,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_log1pl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log1p(_Tp __x) { return __builtin_log1p(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP // DR 568. constexpr float log2(float __x) @@ -1524,13 +1586,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_log2l(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log2(_Tp __x) { return __builtin_log2(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float logb(float __x) { return __builtin_logbf(__x); } @@ -1540,13 +1604,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_logbl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type logb(_Tp __x) { return __builtin_logb(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long lrint(float __x) { return __builtin_lrintf(__x); } @@ -1556,13 +1622,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_lrintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lrint(_Tp __x) { return __builtin_lrint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long lround(float __x) { return __builtin_lroundf(__x); } @@ -1572,13 +1640,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_lroundl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lround(_Tp __x) { return __builtin_lround(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float nearbyint(float __x) { return __builtin_nearbyintf(__x); } @@ -1588,13 +1658,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_nearbyintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nearbyint(_Tp __x) { return __builtin_nearbyint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float nextafter(float __x, float __y) { return __builtin_nextafterf(__x, __y); } @@ -1604,6 +1676,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_nextafterl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type nextafter(_Tp __x, _Up __y) @@ -1611,8 +1684,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return nextafter(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float nexttoward(float __x, long double __y) { return __builtin_nexttowardf(__x, __y); } @@ -1622,13 +1696,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_nexttowardl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nexttoward(_Tp __x, long double __y) { return __builtin_nexttoward(__x, __y); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float remainder(float __x, float __y) { return __builtin_remainderf(__x, __y); } @@ -1638,6 +1714,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_remainderl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remainder(_Tp __x, _Up __y) @@ -1645,8 +1722,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remainder(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float remquo(float __x, float __y, int* __pquo) { return __builtin_remquof(__x, __y, __pquo); } @@ -1656,6 +1734,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_remquol(__x, __y, __pquo); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp, typename _Up> inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remquo(_Tp __x, _Up __y, int* __pquo) @@ -1663,8 +1742,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remquo(__type(__x), __type(__y), __pquo); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float rint(float __x) { return __builtin_rintf(__x); } @@ -1674,13 +1754,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_rintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type rint(_Tp __x) { return __builtin_rint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float round(float __x) { return __builtin_roundf(__x); } @@ -1690,13 +1772,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_roundl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type round(_Tp __x) { return __builtin_round(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float scalbln(float __x, long __ex) { return __builtin_scalblnf(__x, __ex); } @@ -1706,13 +1790,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_scalblnl(__x, __ex); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbln(_Tp __x, long __ex) { return __builtin_scalbln(__x, __ex); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float scalbn(float __x, int __ex) { return __builtin_scalbnf(__x, __ex); } @@ -1722,13 +1808,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_scalbnl(__x, __ex); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbn(_Tp __x, int __ex) { return __builtin_scalbn(__x, __ex); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float tgamma(float __x) { return __builtin_tgammaf(__x); } @@ -1738,13 +1826,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_tgammal(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tgamma(_Tp __x) { return __builtin_tgamma(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float trunc(float __x) { return __builtin_truncf(__x); } @@ -1754,11 +1844,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_truncl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type trunc(_Tp __x) { return __builtin_trunc(__x); } +#endif _GLIBCXX_END_NAMESPACE_VERSION } // namespace |