From 43790e009b556b2b8db2726d12653d9f64a8086d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 18 May 2016 16:28:02 +0200 Subject: [PATCH] Pass argument by const ref instead of by value in pow(AutoDiffScalar...) --- unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index 0e911cd53..089042751 100755 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -602,7 +602,7 @@ EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(log, template inline const Eigen::AutoDiffScalar::type>::Scalar>, const typename internal::remove_all::type> > -pow(const Eigen::AutoDiffScalar& x, typename internal::traits::type>::Scalar y) +pow(const Eigen::AutoDiffScalar& x, const typename internal::traits::type>::Scalar &y) { using namespace Eigen; typedef typename internal::remove_all::type DerTypeCleaned;