2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-21 15:32:12 +00:00

Renamed std cmath problem

Extended cstdlib workaround to MIPSpro

svn path=/trunk/boost/boost/numeric/ublas/; revision=24695
This commit is contained in:
Michael Stevens
2004-08-24 06:51:21 +00:00
parent ca87aacacb
commit a1d0e6d979
2 changed files with 18 additions and 8 deletions

View File

@@ -71,7 +71,7 @@
// MSVC extensions seem to disable abs () overloads in <cmath>.
#ifdef _MSC_EXTENSIONS
#define BOOST_UBLAS_NO_CMATH
#define BOOST_UBLAS_CMATH_BAD_STD
#endif
// We must disable element proxies as they require template partial specialisation
@@ -166,7 +166,17 @@ namespace std {
#if defined (__COMO__) && ! defined (BOOST_STRICT_CONFIG)
// Without this we don't get abs overloads for float types in <cmath>
// This should should be library version specific, but to find this out we need to include a header!
// This should should be library version specific.
#include <cstdlib>
#endif
#if defined (__sgi) && ! defined (BOOST_STRICT_CONFIG)
// Without this we don't get abs overloads for float types in <cmath>
// This should should be library version specific.
#include <cstdlib>
#endif

View File

@@ -123,7 +123,7 @@ namespace boost { namespace numeric { namespace ublas {
static
BOOST_UBLAS_INLINE
real_type abs (const_reference t) {
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_NO_CMATH)
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_CMATH_BAD_STD)
return ::fabsf (t);
#else
return std::abs (t);
@@ -132,7 +132,7 @@ namespace boost { namespace numeric { namespace ublas {
static
BOOST_UBLAS_INLINE
value_type sqrt (const_reference t) {
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_NO_CMATH)
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_CMATH_BAD_STD)
return ::sqrtf (t);
#else
return std::sqrt (t);
@@ -199,7 +199,7 @@ namespace boost { namespace numeric { namespace ublas {
static
BOOST_UBLAS_INLINE
real_type abs (const_reference t) {
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_NO_CMATH)
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_CMATH_BAD_STD)
return ::fabs (t);
#else
return std::abs (t);
@@ -208,7 +208,7 @@ namespace boost { namespace numeric { namespace ublas {
static
BOOST_UBLAS_INLINE
value_type sqrt (const_reference t) {
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_NO_CMATH)
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_CMATH_BAD_STD)
return ::sqrt (t);
#else
return std::sqrt (t);
@@ -272,7 +272,7 @@ namespace boost { namespace numeric { namespace ublas {
static
BOOST_UBLAS_INLINE
real_type abs (const_reference t) {
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_NO_CMATH)
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_CMATH_BAD_STD)
return ::fabsl (t);
#else
return std::abs (t);
@@ -281,7 +281,7 @@ namespace boost { namespace numeric { namespace ublas {
static
BOOST_UBLAS_INLINE
value_type sqrt (const_reference t) {
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_NO_CMATH)
#if defined (BOOST_NO_STDC_NAMESPACE) || defined (BOOST_UBLAS_CMATH_BAD_STD)
return ::sqrtl (t);
#else
return std::sqrt (t);