From efd484546e5482f83fb26187f88b99d8d7eca295 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 (grafted from 971cfbb480614229b5f48b040ef9d5dd18a4ab44) --- 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 8d42e69b9..fde3ff61a 100644 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -631,7 +631,7 @@ template struct NumTraits > { typedef AutoDiffScalar::Real,DerType::RowsAtCompileTime,DerType::ColsAtCompileTime> > Real; typedef AutoDiffScalar NonInteger; - typedef AutoDiffScalar& Nested; + typedef AutoDiffScalar Nested; enum{ RequireInitialization = 1 };