diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-23 18:38:22 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-23 18:38:22 +0000 |
| commit | 8c0edf5c2aad076cbc805299ed82845ae049f4f6 (patch) | |
| tree | a2111588d46122f6a79724d1ee665e0d9e5eeaa7 /libstdc++-v3/include/c_std/cmath | |
| parent | 3506b33fb392a4177653c120138be8da0b28f71a (diff) | |
| download | ppe42-gcc-8c0edf5c2aad076cbc805299ed82845ae049f4f6.tar.gz ppe42-gcc-8c0edf5c2aad076cbc805299ed82845ae049f4f6.zip | |
2009-07-23 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_std/cmath (abs(_Tp)): Add.
* include/c_global/cmath (abs(_Tp)): Likewise.
* testsuite/26_numerics/headers/cmath/overloads.cc: Extend.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150022 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/c_std/cmath')
| -rw-r--r-- | libstdc++-v3/include/c_std/cmath | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libstdc++-v3/include/c_std/cmath b/libstdc++-v3/include/c_std/cmath index a0bebc9906f..3ee1393073f 100644 --- a/libstdc++-v3/include/c_std/cmath +++ b/libstdc++-v3/include/c_std/cmath @@ -93,6 +93,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) abs(long double __x) { return __builtin_fabsl(__x); } + template<typename _Tp> + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + abs(_Tp __x) + { return __builtin_fabs(__x); } + using ::acos; inline float @@ -120,8 +126,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __builtin_asinl(__x); } template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, - double>::__type + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type asin(_Tp __x) { return __builtin_asin(__x); } @@ -136,8 +142,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __builtin_atanl(__x); } template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, - double>::__type + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type atan(_Tp __x) { return __builtin_atan(__x); } @@ -293,8 +299,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type - ldexp(_Tp __x, int __exp) - { return __builtin_ldexp(__x, __exp); } + ldexp(_Tp __x, int __exp) + { return __builtin_ldexp(__x, __exp); } using ::log; |

