Boost logo

Ublas :

Subject: Re: [ublas] Should/can I use GitHub to fix issue #7902 Division by scalar should use enable_if<>
From: Sean Reilly (campreilly_at_[hidden])
Date: 2014-12-09 14:40:43


Still having a problem getting the tests to running on CentOS 6.6 with gcc
4.4.7 compiler.

/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_function.h:199:
error: ‘template<class _Tp> struct std::equal_to’ is not a function,
common/testhelper.hpp:126: error: conflict with ‘template<class M1, class
M2> bool equal_to(const boost::numeric::ublas::vector_expression<E>&, const
boost::numeric::ublas::vector_expression<E2>&, double)’
test_assignment.cpp:30: error: in call to ‘equal_to’
test_assignment.cpp:601: instantiated from here

Basically, there seems to be a name conflict between the equal_to()
template function defined in testhelper.h

template < class M1, class M2 >
bool equal_to( const boost::numeric::ublas::vector_expression<M1> & m1,
               const boost::numeric::ublas::vector_expression<M2> & m2,
               double tolerance = 0.0 ) {
    if (m1().size() != m2().size()) {
        return false;
    }

    return mean_square(m2() - m1()) <= tolerance;
}

And the equal_to() template function defined in stl_function.h

  template<typename _Tp>
    struct equal_to : public binary_function<_Tp, _Tp, bool>
    {
      bool
      operator()(const _Tp& __x, const _Tp& __y) const
      { return __x == __y; }
    };

Anybody else having this issue?

Sean Reilly