diff --git a/include/boost/numeric/ublas/config.hpp b/include/boost/numeric/ublas/config.hpp index 5a7e7e17..34ad8789 100644 --- a/include/boost/numeric/ublas/config.hpp +++ b/include/boost/numeric/ublas/config.hpp @@ -71,7 +71,7 @@ // MSVC extensions seem to disable abs () overloads in . #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 -// 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 + +#endif + + + +#if defined (__sgi) && ! defined (BOOST_STRICT_CONFIG) + +// Without this we don't get abs overloads for float types in +// This should should be library version specific. #include #endif diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index 12bbcd90..d907a079 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -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);