fix unit test compilation
This commit is contained in:
parent
efd484546e
commit
6056f4404c
@ -11,10 +11,11 @@
|
|||||||
|
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
|
|
||||||
template <typename MatrixType>
|
|
||||||
void rvalue_copyassign(const MatrixType& )
|
|
||||||
{
|
|
||||||
#ifdef EIGEN_HAVE_RVALUE_REFERENCES
|
#ifdef EIGEN_HAVE_RVALUE_REFERENCES
|
||||||
|
template <typename MatrixType>
|
||||||
|
void rvalue_copyassign(const MatrixType& m)
|
||||||
|
{
|
||||||
|
|
||||||
typedef typename internal::traits<MatrixType>::Scalar Scalar;
|
typedef typename internal::traits<MatrixType>::Scalar Scalar;
|
||||||
|
|
||||||
// create a temporary which we are about to destroy by moving
|
// 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
|
// verify that the content did not change
|
||||||
Scalar abs_diff = (m-n).array().abs().sum();
|
Scalar abs_diff = (m-n).array().abs().sum();
|
||||||
VERIFY_IS_EQUAL(abs_diff, Scalar(0));
|
VERIFY_IS_EQUAL(abs_diff, Scalar(0));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
template <typename MatrixType>
|
||||||
|
void rvalue_copyassign(const MatrixType&) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
void test_rvalue_types()
|
void test_rvalue_types()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user