From 9ceaa8e445524e9f63720fa5015fa06f6dbdcb0e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 5 Nov 2015 13:54:26 +0100 Subject: [PATCH] bug #1063: nest AutoDiffScalar by value to avoid dead references --- 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 bc641aef4..8b58b512b 100644 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -629,7 +629,7 @@ template struct NumTraits > typedef AutoDiffScalar::Real,DerType::RowsAtCompileTime,DerType::ColsAtCompileTime, DerType::Options, DerType::MaxRowsAtCompileTime, DerType::MaxColsAtCompileTime> > Real; typedef AutoDiffScalar NonInteger; - typedef AutoDiffScalar& Nested; + typedef AutoDiffScalar Nested; enum{ RequireInitialization = 1 };