__GNUC__ tests don't belong in pure implementation!

[SVN r27343]
This commit is contained in:
Michael Stevens 2005-02-13 13:40:29 +00:00
parent c96cb7a868
commit 0a115f9aa8
2 changed files with 3 additions and 17 deletions

View File

@ -28,18 +28,11 @@ namespace boost { namespace numeric { namespace ublas {
BOOST_UBLAS_INLINE
bool equals (const matrix_expression<E1> &e1, const matrix_expression<E2> &e2) {
typedef typename type_traits<typename promote_traits<typename E1::value_type,
typename E2::value_type>::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<real_type> (std::max<real_type> (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);
}

View File

@ -28,18 +28,11 @@ namespace boost { namespace numeric { namespace ublas {
BOOST_UBLAS_INLINE
bool equals (const vector_expression<E1> &e1, const vector_expression<E2> &e2) {
typedef typename type_traits<typename promote_traits<typename E1::value_type,
typename E2::value_type>::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<real_type> (std::max<real_type> (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
}