Commit 28b69d5d by Paolo Carlini Committed by Paolo Carlini

cmath: Tweak includes.

2007-06-13  Paolo Carlini  <pcarlini@suse.de>

	* include/c_global/cmath: Tweak includes.
	* include/std/memory: Likewise.
	* include/std/complex: Likewise.
	* include/tr1/memory: Likewise.
	* include/tr1/complex: Likewise.
	* include/tr1/cmath: Likewise; do not wrap special functions
	in #ifndef __GXX_EXPERIMENTAL_CXX0X__.

From-SVN: r125671
parent 0d52bcc1
2007-06-13 Paolo Carlini <pcarlini@suse.de>
* include/c_global/cmath: Tweak includes.
* include/std/memory: Likewise.
* include/std/complex: Likewise.
* include/tr1/memory: Likewise.
* include/tr1/complex: Likewise.
* include/tr1/cmath: Likewise; do not wrap special functions
in #ifndef __GXX_EXPERIMENTAL_CXX0X__.
2007-06-10 Benjamin Kosnik <bkoz@redhat.com> 2007-06-10 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/util/testsuite_performance.h: Add cstring include for * testsuite/util/testsuite_performance.h: Add cstring include for
......
...@@ -612,7 +612,6 @@ _GLIBCXX_END_NAMESPACE ...@@ -612,7 +612,6 @@ _GLIBCXX_END_NAMESPACE
# if defined(_GLIBCXX_INCLUDE_AS_TR1) # if defined(_GLIBCXX_INCLUDE_AS_TR1)
# error C++0x header cannot be included from TR1 header # error C++0x header cannot be included from TR1 header
# endif # endif
# include <type_traits>
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X) # if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
# include <tr1_impl/cmath> # include <tr1_impl/cmath>
# else # else
......
...@@ -1539,7 +1539,6 @@ _GLIBCXX_END_NAMESPACE ...@@ -1539,7 +1539,6 @@ _GLIBCXX_END_NAMESPACE
# if defined(_GLIBCXX_INCLUDE_AS_TR1) # if defined(_GLIBCXX_INCLUDE_AS_TR1)
# error C++0x header cannot be included from TR1 header # error C++0x header cannot be included from TR1 header
# endif # endif
# include <type_traits>
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X) # if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
# include <tr1_impl/complex> # include <tr1_impl/complex>
# else # else
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
# error C++0x header cannot be included from TR1 header # error C++0x header cannot be included from TR1 header
# endif # endif
# include <exception> // std::exception # include <exception> // std::exception
# include <new> // std::bad_alloc
# include <typeinfo> // std::type_info in get_deleter # include <typeinfo> // std::type_info in get_deleter
# include <bits/stl_algobase.h> // std::swap # include <bits/stl_algobase.h> // std::swap
# include <iosfwd> // std::basic_ostream # include <iosfwd> // std::basic_ostream
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
#endif #endif
#include <cmath> #include <cmath>
#include <ext/type_traits.h>
#include <tr1/type_traits>
#if defined(_GLIBCXX_INCLUDE_AS_TR1) #if defined(_GLIBCXX_INCLUDE_AS_TR1)
# include <tr1_impl/cmath> # include <tr1_impl/cmath>
...@@ -63,10 +61,10 @@ ...@@ -63,10 +61,10 @@
* A collection of advanced mathematical special functions. * A collection of advanced mathematical special functions.
* @{ * @{
*/ */
#ifndef __GXX_EXPERIMENTAL_CXX0X__
#include <bits/stl_algobase.h> #include <bits/stl_algobase.h>
#include <limits> #include <limits>
#include <tr1/type_traits>
#include <tr1/gamma.tcc> #include <tr1/gamma.tcc>
#include <tr1/bessel_function.tcc> #include <tr1/bessel_function.tcc>
#include <tr1/beta_function.tcc> #include <tr1/beta_function.tcc>
...@@ -85,7 +83,6 @@ namespace std ...@@ -85,7 +83,6 @@ namespace std
namespace tr1 namespace tr1
{ {
// 5.2.1.1 Associated Laguerre polynomials. // 5.2.1.1 Associated Laguerre polynomials.
inline float inline float
assoc_laguerref(unsigned int __n, unsigned int __m, float __x) assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
{ return __detail::__assoc_laguerre<float>(__n, __m, __x); } { return __detail::__assoc_laguerre<float>(__n, __m, __x); }
...@@ -104,9 +101,7 @@ namespace tr1 ...@@ -104,9 +101,7 @@ namespace tr1
return __detail::__assoc_laguerre<__type>(__n, __m, __x); return __detail::__assoc_laguerre<__type>(__n, __m, __x);
} }
// 5.2.1.2 Associated Legendre functions. // 5.2.1.2 Associated Legendre functions.
inline float inline float
assoc_legendref(unsigned int __l, unsigned int __m, float __x) assoc_legendref(unsigned int __l, unsigned int __m, float __x)
{ return __detail::__assoc_legendre_p<float>(__l, __m, __x); } { return __detail::__assoc_legendre_p<float>(__l, __m, __x); }
...@@ -123,9 +118,7 @@ namespace tr1 ...@@ -123,9 +118,7 @@ namespace tr1
return __detail::__assoc_legendre_p<__type>(__l, __m, __x); return __detail::__assoc_legendre_p<__type>(__l, __m, __x);
} }
// 5.2.1.3 Beta functions. // 5.2.1.3 Beta functions.
inline float inline float
betaf(float __x, float __y) betaf(float __x, float __y)
{ return __detail::__beta<float>(__x, __y); } { return __detail::__beta<float>(__x, __y); }
...@@ -142,9 +135,7 @@ namespace tr1 ...@@ -142,9 +135,7 @@ namespace tr1
return __detail::__beta<__type>(__x, __y); return __detail::__beta<__type>(__x, __y);
} }
// 5.2.1.4 Complete elliptic interals of the first kind. // 5.2.1.4 Complete elliptic interals of the first kind.
inline float inline float
comp_ellint_1f(float __k) comp_ellint_1f(float __k)
{ return __detail::__comp_ellint_1<float>(__k); } { return __detail::__comp_ellint_1<float>(__k); }
...@@ -161,9 +152,7 @@ namespace tr1 ...@@ -161,9 +152,7 @@ namespace tr1
return __detail::__comp_ellint_1<__type>(__k); return __detail::__comp_ellint_1<__type>(__k);
} }
// 5.2.1.5 Complete elliptic interals of the second kind. // 5.2.1.5 Complete elliptic interals of the second kind.
inline float inline float
comp_ellint_2f(float __k) comp_ellint_2f(float __k)
{ return __detail::__comp_ellint_2<float>(__k); } { return __detail::__comp_ellint_2<float>(__k); }
...@@ -180,9 +169,7 @@ namespace tr1 ...@@ -180,9 +169,7 @@ namespace tr1
return __detail::__comp_ellint_2<__type>(__k); return __detail::__comp_ellint_2<__type>(__k);
} }
// 5.2.1.6 Complete elliptic interals of the third kind. // 5.2.1.6 Complete elliptic interals of the third kind.
inline float inline float
comp_ellint_3f(float __k, float __nu) comp_ellint_3f(float __k, float __nu)
{ return __detail::__comp_ellint_3<float>(__k, __nu); } { return __detail::__comp_ellint_3<float>(__k, __nu); }
...@@ -199,9 +186,7 @@ namespace tr1 ...@@ -199,9 +186,7 @@ namespace tr1
return __detail::__comp_ellint_3<__type>(__k, __nu); return __detail::__comp_ellint_3<__type>(__k, __nu);
} }
// 5.2.1.7 Confluent hypergeometric functions. // 5.2.1.7 Confluent hypergeometric functions.
inline float inline float
conf_hypergf(float __a, float __c, float __x) conf_hypergf(float __a, float __c, float __x)
{ return __detail::__conf_hyperg<float>(__a, __c, __x); } { return __detail::__conf_hyperg<float>(__a, __c, __x); }
...@@ -218,9 +203,7 @@ namespace tr1 ...@@ -218,9 +203,7 @@ namespace tr1
return __detail::__conf_hyperg<__type>(__a, __c, __x); return __detail::__conf_hyperg<__type>(__a, __c, __x);
} }
// 5.2.1.8 Regular modified cylindrical Bessel functions. // 5.2.1.8 Regular modified cylindrical Bessel functions.
inline float inline float
cyl_bessel_if(float __nu, float __x) cyl_bessel_if(float __nu, float __x)
{ return __detail::__cyl_bessel_i<float>(__nu, __x); } { return __detail::__cyl_bessel_i<float>(__nu, __x); }
...@@ -237,9 +220,7 @@ namespace tr1 ...@@ -237,9 +220,7 @@ namespace tr1
return __detail::__cyl_bessel_i<__type>(__nu, __x); return __detail::__cyl_bessel_i<__type>(__nu, __x);
} }
// 5.2.1.9 Cylindrical Bessel functions (of the first kind). // 5.2.1.9 Cylindrical Bessel functions (of the first kind).
inline float inline float
cyl_bessel_jf(float __nu, float __x) cyl_bessel_jf(float __nu, float __x)
{ return __detail::__cyl_bessel_j<float>(__nu, __x); } { return __detail::__cyl_bessel_j<float>(__nu, __x); }
...@@ -256,9 +237,7 @@ namespace tr1 ...@@ -256,9 +237,7 @@ namespace tr1
return __detail::__cyl_bessel_j<__type>(__nu, __x); return __detail::__cyl_bessel_j<__type>(__nu, __x);
} }
// 5.2.1.10 Irregular modified cylindrical Bessel functions. // 5.2.1.10 Irregular modified cylindrical Bessel functions.
inline float inline float
cyl_bessel_kf(float __nu, float __x) cyl_bessel_kf(float __nu, float __x)
{ return __detail::__cyl_bessel_k<float>(__nu, __x); } { return __detail::__cyl_bessel_k<float>(__nu, __x); }
...@@ -275,9 +254,7 @@ namespace tr1 ...@@ -275,9 +254,7 @@ namespace tr1
return __detail::__cyl_bessel_k<__type>(__nu, __x); return __detail::__cyl_bessel_k<__type>(__nu, __x);
} }
// 5.2.1.11 Cylindrical Neumann functions. // 5.2.1.11 Cylindrical Neumann functions.
inline float inline float
cyl_neumannf(float __nu, float __x) cyl_neumannf(float __nu, float __x)
{ return __detail::__cyl_neumann_n<float>(__nu, __x); } { return __detail::__cyl_neumann_n<float>(__nu, __x); }
...@@ -294,9 +271,7 @@ namespace tr1 ...@@ -294,9 +271,7 @@ namespace tr1
return __detail::__cyl_neumann_n<__type>(__nu, __x); return __detail::__cyl_neumann_n<__type>(__nu, __x);
} }
// 5.2.1.12 Incomplete elliptic interals of the first kind. // 5.2.1.12 Incomplete elliptic interals of the first kind.
inline float inline float
ellint_1f(float __k, float __phi) ellint_1f(float __k, float __phi)
{ return __detail::__ellint_1<float>(__k, __phi); } { return __detail::__ellint_1<float>(__k, __phi); }
...@@ -313,9 +288,7 @@ namespace tr1 ...@@ -313,9 +288,7 @@ namespace tr1
return __detail::__ellint_1<__type>(__k, __phi); return __detail::__ellint_1<__type>(__k, __phi);
} }
// 5.2.1.13 Incomplete elliptic interals of the second kind. // 5.2.1.13 Incomplete elliptic interals of the second kind.
inline float inline float
ellint_2f(float __k, float __phi) ellint_2f(float __k, float __phi)
{ return __detail::__ellint_2<float>(__k, __phi); } { return __detail::__ellint_2<float>(__k, __phi); }
...@@ -332,9 +305,7 @@ namespace tr1 ...@@ -332,9 +305,7 @@ namespace tr1
return __detail::__ellint_2<__type>(__k, __phi); return __detail::__ellint_2<__type>(__k, __phi);
} }
// 5.2.1.14 Incomplete elliptic interals of the third kind. // 5.2.1.14 Incomplete elliptic interals of the third kind.
inline float inline float
ellint_3f(float __k, float __nu, float __phi) ellint_3f(float __k, float __nu, float __phi)
{ return __detail::__ellint_3<float>(__k, __nu, __phi); } { return __detail::__ellint_3<float>(__k, __nu, __phi); }
...@@ -351,9 +322,7 @@ namespace tr1 ...@@ -351,9 +322,7 @@ namespace tr1
return __detail::__ellint_3<__type>(__k, __nu, __phi); return __detail::__ellint_3<__type>(__k, __nu, __phi);
} }
// 5.2.1.15 Exponential integrals. // 5.2.1.15 Exponential integrals.
inline float inline float
expintf(float __x) expintf(float __x)
{ return __detail::__expint<float>(__x); } { return __detail::__expint<float>(__x); }
...@@ -370,9 +339,7 @@ namespace tr1 ...@@ -370,9 +339,7 @@ namespace tr1
return __detail::__expint<__type>(__x); return __detail::__expint<__type>(__x);
} }
// 5.2.1.16 Hermite polynomials. // 5.2.1.16 Hermite polynomials.
inline float inline float
hermitef(unsigned int __n, float __x) hermitef(unsigned int __n, float __x)
{ return __detail::__poly_hermite<float>(__n, __x); } { return __detail::__poly_hermite<float>(__n, __x); }
...@@ -389,9 +356,7 @@ namespace tr1 ...@@ -389,9 +356,7 @@ namespace tr1
return __detail::__poly_hermite<__type>(__n, __x); return __detail::__poly_hermite<__type>(__n, __x);
} }
// 5.2.1.17 Hypergeometric functions. // 5.2.1.17 Hypergeometric functions.
inline float inline float
hypergf(float __a, float __b, float __c, float __x) hypergf(float __a, float __b, float __c, float __x)
{ return __detail::__hyperg<float>(__a, __b, __c, __x); } { return __detail::__hyperg<float>(__a, __b, __c, __x); }
...@@ -408,9 +373,7 @@ namespace tr1 ...@@ -408,9 +373,7 @@ namespace tr1
return __detail::__hyperg<__type>(__a, __b, __c, __x); return __detail::__hyperg<__type>(__a, __b, __c, __x);
} }
// 5.2.1.18 Laguerre polynomials. // 5.2.1.18 Laguerre polynomials.
inline float inline float
laguerref(unsigned int __n, float __x) laguerref(unsigned int __n, float __x)
{ return __detail::__laguerre<float>(__n, __x); } { return __detail::__laguerre<float>(__n, __x); }
...@@ -427,9 +390,7 @@ namespace tr1 ...@@ -427,9 +390,7 @@ namespace tr1
return __detail::__laguerre<__type>(__n, __x); return __detail::__laguerre<__type>(__n, __x);
} }
// 5.2.1.19 Legendre polynomials. // 5.2.1.19 Legendre polynomials.
inline float inline float
legendref(unsigned int __n, float __x) legendref(unsigned int __n, float __x)
{ return __detail::__poly_legendre_p<float>(__n, __x); } { return __detail::__poly_legendre_p<float>(__n, __x); }
...@@ -446,9 +407,7 @@ namespace tr1 ...@@ -446,9 +407,7 @@ namespace tr1
return __detail::__poly_legendre_p<__type>(__n, __x); return __detail::__poly_legendre_p<__type>(__n, __x);
} }
// 5.2.1.20 Riemann zeta function. // 5.2.1.20 Riemann zeta function.
inline float inline float
riemann_zetaf(float __x) riemann_zetaf(float __x)
{ return __detail::__riemann_zeta<float>(__x); } { return __detail::__riemann_zeta<float>(__x); }
...@@ -465,9 +424,7 @@ namespace tr1 ...@@ -465,9 +424,7 @@ namespace tr1
return __detail::__riemann_zeta<__type>(__x); return __detail::__riemann_zeta<__type>(__x);
} }
// 5.2.1.21 Spherical Bessel functions. // 5.2.1.21 Spherical Bessel functions.
inline float inline float
sph_besself(unsigned int __n, float __x) sph_besself(unsigned int __n, float __x)
{ return __detail::__sph_bessel<float>(__n, __x); } { return __detail::__sph_bessel<float>(__n, __x); }
...@@ -484,9 +441,7 @@ namespace tr1 ...@@ -484,9 +441,7 @@ namespace tr1
return __detail::__sph_bessel<__type>(__n, __x); return __detail::__sph_bessel<__type>(__n, __x);
} }
// 5.2.1.22 Spherical associated Legendre functions. // 5.2.1.22 Spherical associated Legendre functions.
inline float inline float
sph_legendref(unsigned int __l, unsigned int __m, float __theta) sph_legendref(unsigned int __l, unsigned int __m, float __theta)
{ return __detail::__sph_legendre<float>(__l, __m, __theta); } { return __detail::__sph_legendre<float>(__l, __m, __theta); }
...@@ -503,9 +458,7 @@ namespace tr1 ...@@ -503,9 +458,7 @@ namespace tr1
return __detail::__sph_legendre<__type>(__l, __m, __theta); return __detail::__sph_legendre<__type>(__l, __m, __theta);
} }
// 5.2.1.23 Spherical Neumann functions. // 5.2.1.23 Spherical Neumann functions.
inline float inline float
sph_neumannf(unsigned int __n, float __x) sph_neumannf(unsigned int __n, float __x)
{ return __detail::__sph_neumann<float>(__n, __x); } { return __detail::__sph_neumann<float>(__n, __x); }
...@@ -523,10 +476,7 @@ namespace tr1 ...@@ -523,10 +476,7 @@ namespace tr1
} }
/* @} */ // group tr1_math_spec_func /* @} */ // group tr1_math_spec_func
} }
} }
#endif // __GXX_EXPERIMENTAL_CXX0X__
#endif // _GLIBCXX_TR1_CMATH #endif // _GLIBCXX_TR1_CMATH
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
#endif #endif
#include <complex> #include <complex>
#include <ext/type_traits.h>
#include <tr1/type_traits>
#if defined(_GLIBCXX_INCLUDE_AS_TR1) #if defined(_GLIBCXX_INCLUDE_AS_TR1)
# include <tr1_impl/complex> # include <tr1_impl/complex>
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <memory> #include <memory>
#include <exception> // std::exception #include <exception> // std::exception
#include <new> // std::bad_alloc
#include <typeinfo> // std::type_info in get_deleter #include <typeinfo> // std::type_info in get_deleter
#include <bits/stl_algobase.h> // std::swap #include <bits/stl_algobase.h> // std::swap
#include <iosfwd> // std::basic_ostream #include <iosfwd> // std::basic_ostream
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment