diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2013-08-02 22:54:01 +0200 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2013-08-02 22:54:01 +0200 |
commit | 3444f06f684ca10df70b29af812e8f0c572a709a (patch) | |
tree | edebca00b014227e6c8fc7132eaa2a0122cf2c39 /test/rvalue_types.cpp | |
parent | 8f4d93a4b7b15fdd240f4c3c283128cead6eae16 (diff) |
Removed a warning when rvalue references are not unsed.
Diffstat (limited to 'test/rvalue_types.cpp')
-rw-r--r-- | test/rvalue_types.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/rvalue_types.cpp b/test/rvalue_types.cpp index 5a581d0df..0e32f111e 100644 --- a/test/rvalue_types.cpp +++ b/test/rvalue_types.cpp @@ -26,10 +26,11 @@ #include <Eigen/Core> +#ifdef EIGEN_HAVE_RVALUE_REFERENCES template <typename MatrixType> void rvalue_copyassign(const MatrixType& m) -{ -#ifdef EIGEN_HAVE_RVALUE_REFERENCES +{ + typedef typename internal::traits<MatrixType>::Scalar Scalar; // create a temporary which we are about to destroy by moving @@ -49,8 +50,11 @@ void rvalue_copyassign(const MatrixType& m) // 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() { |