Re: Should/can I use GitHub to fix issue #7902 Division by scalar should use enable_if<>

Sean Reilly <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <CAJAKk0U-Vtj-Y7Bq3_UHGJmMk6TPYzn49-=QK9hhUoOn8Ue1YQ@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.