Re: [eigen] Overloading componentwise binary operators for vectors |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
========================================================template<typename ScalarType>Vector<ScalarType> operator+(Vector<ScalarType> const & lhs, Vector<ScalarType> const & rhs){ return lhs.wrapped_ + right.wrapped_; }========================================================does not work. I guess it is because an _expression_ template is returned by operator + in Eigen..
========================================================
erreur: ambiguous overload for ‘operator+’ (operand types are ‘Vector<double>’ and ‘Vector<double>’)
CPPUNIT_ASSERT_EQUAL(sum, left+right);
========================================================
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |