fix unit test compilation

This commit is contained in:
Gael Guennebaud 2015-11-05 15:36:48 +01:00
parent efd484546e
commit 6056f4404c

View File

@ -11,10 +11,11 @@
#include <Eigen/Core>
template <typename MatrixType>
void rvalue_copyassign(const MatrixType& )
{
#ifdef EIGEN_HAVE_RVALUE_REFERENCES
template <typename MatrixType>
void rvalue_copyassign(const MatrixType& m)
{
typedef typename internal::traits<MatrixType>::Scalar Scalar;
// create a temporary which we are about to destroy by moving
@ -34,8 +35,11 @@ void rvalue_copyassign(const MatrixType& )
// verify that the content did not change
Scalar abs_diff = (m-n).array().abs().sum();
VERIFY_IS_EQUAL(abs_diff, Scalar(0));
#endif
}
#else
template <typename MatrixType>
void rvalue_copyassign(const MatrixType&) {}
#endif
void test_rvalue_types()
{