From ba2c8efdcfe8f3b58797080a412410423d223765 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Wed, 12 Sep 2018 11:49:10 +0200 Subject: [PATCH] EIGEN_UNUSED is not supported by g++4.7 (and not portable) --- unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index 13d959df4..2db914765 100755 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -534,7 +534,8 @@ struct ScalarBinaryOpTraits, Bi EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename Eigen::internal::remove_all::type, typename Eigen::internal::traits::type>::Scalar, product) > \ FUNC(const Eigen::AutoDiffScalar& x) { \ using namespace Eigen; \ - EIGEN_UNUSED typedef typename Eigen::internal::traits::type>::Scalar Scalar; \ + typedef typename Eigen::internal::traits::type>::Scalar Scalar; \ + EIGEN_UNUSED_VARIABLE(sizeof(Scalar)); \ CODE; \ }