From d25599dc2897d7e4ec442990c7ae5fa613d7ae6c Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 13 Feb 2005 13:40:29 +0000 Subject: [PATCH] __GNUC__ tests don't belong in pure implementation! svn path=/trunk/boost/boost/numeric/ublas/; revision=27343 --- include/boost/numeric/ublas/detail/matrix_assign.hpp | 11 ++--------- include/boost/numeric/ublas/detail/vector_assign.hpp | 9 +-------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/include/boost/numeric/ublas/detail/matrix_assign.hpp b/include/boost/numeric/ublas/detail/matrix_assign.hpp index e85b8c11..551c1dca 100644 --- a/include/boost/numeric/ublas/detail/matrix_assign.hpp +++ b/include/boost/numeric/ublas/detail/matrix_assign.hpp @@ -28,18 +28,11 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE bool equals (const matrix_expression &e1, const matrix_expression &e2) { typedef typename type_traits::promote_type>::real_type real_type; -#ifndef __GNUC__ + typename E2::value_type>::promote_type>::real_type real_type; return norm_inf (e1 - e2) < BOOST_UBLAS_TYPE_CHECK_EPSILON * std::max (std::max (norm_inf (e1), norm_inf (e2)), - BOOST_UBLAS_TYPE_CHECK_MIN); -#else - // GCC 3.1, oops?! - return norm_inf (e1 - e2) < BOOST_UBLAS_TYPE_CHECK_EPSILON * - (std::max) (real_type ((std::max) (real_type (norm_inf (e1)), real_type (norm_inf (e2)))), - real_type (BOOST_UBLAS_TYPE_CHECK_MIN)); -#endif + BOOST_UBLAS_TYPE_CHECK_MIN); } diff --git a/include/boost/numeric/ublas/detail/vector_assign.hpp b/include/boost/numeric/ublas/detail/vector_assign.hpp index 8b51b013..e062517f 100644 --- a/include/boost/numeric/ublas/detail/vector_assign.hpp +++ b/include/boost/numeric/ublas/detail/vector_assign.hpp @@ -28,18 +28,11 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE bool equals (const vector_expression &e1, const vector_expression &e2) { typedef typename type_traits::promote_type>::real_type real_type; -#ifndef __GNUC__ + typename E2::value_type>::promote_type>::real_type real_type; return norm_inf (e1 - e2) < BOOST_UBLAS_TYPE_CHECK_EPSILON * std::max (std::max (norm_inf (e1), norm_inf (e2)), BOOST_UBLAS_TYPE_CHECK_MIN); -#else - // GCC 3.1, oops?! - return norm_inf (e1 - e2) < BOOST_UBLAS_TYPE_CHECK_EPSILON * - (std::max) (real_type ((std::max) (real_type (norm_inf (e1)), real_type (norm_inf (e2)))), - real_type (BOOST_UBLAS_TYPE_CHECK_MIN)); -#endif }