diff options
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/c_global/cmath | 118 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/cmath | 6 |
3 files changed, 11 insertions, 122 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 651861d77f2..210515f16bd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,14 @@ 2010-11-02 Paolo Carlini <paolo.carlini@oracle.com> + * include/c_global/cmath (fpclassify, isfinite, isinf, isnan, + isnormal, signbit, isgreater, isgreaterequal, isless, islessequal, + islessgreater, isunordered): Remove spurious duplicate definition + added in the last commit. + + * include/tr1/cmath: Remove tr1_impl leftover macro. + +2010-11-02 Paolo Carlini <paolo.carlini@oracle.com> + * include/tr1_impl/cinttypes: Remove, move contents to C++0x and TR1 headers. * include/tr1_impl/cstdlib: Likewise. diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index b1b6e2d29e2..69d424c2721 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -1102,123 +1102,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::truncf; using ::truncl; -#if _GLIBCXX_USE_C99_MATH -#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC - - /// Function template definitions [8.16.3]. - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - fpclassify(_Tp __f) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, - FP_SUBNORMAL, FP_ZERO, __type(__f)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isfinite(_Tp __f) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isfinite(__type(__f)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isinf(_Tp __f) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isinf(__type(__f)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isnan(_Tp __f) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isnan(__type(__f)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isnormal(_Tp __f) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isnormal(__type(__f)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - signbit(_Tp __f) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_signbit(__type(__f)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isgreater(_Tp __f1, _Tp __f2) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isgreater(__type(__f1), __type(__f2)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isgreaterequal(_Tp __f1, _Tp __f2) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isgreaterequal(__type(__f1), __type(__f2)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isless(_Tp __f1, _Tp __f2) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isless(__type(__f1), __type(__f2)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - islessequal(_Tp __f1, _Tp __f2) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_islessequal(__type(__f1), __type(__f2)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - islessgreater(_Tp __f1, _Tp __f2) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_islessgreater(__type(__f1), __type(__f2)); - } - - template<typename _Tp> - inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, - int>::__type - isunordered(_Tp __f1, _Tp __f2) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_isunordered(__type(__f1), __type(__f2)); - } - -#endif -#endif - - /// Additional overloads [8.16.4]. + /// Additional overloads. inline float acosh(float __x) { return __builtin_acoshf(__x); } diff --git a/libstdc++-v3/include/tr1/cmath b/libstdc++-v3/include/tr1/cmath index 4c6e4c1ece7..36c9a733a6d 100644 --- a/libstdc++-v3/include/tr1/cmath +++ b/libstdc++-v3/include/tr1/cmath @@ -1,6 +1,6 @@ // TR1 cmath -*- C++ -*- -// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,10 +31,6 @@ #pragma GCC system_header -#if defined(_GLIBCXX_INCLUDE_AS_CXX0X) -# error TR1 header cannot be included from C++0x header -#endif - #include <cmath> #ifdef _GLIBCXX_USE_C99_MATH_TR1 |