diff --git a/gtsam_unstable/nonlinear/Expression.h b/gtsam_unstable/nonlinear/Expression.h index 76e71ccc7..18e6c35e1 100644 --- a/gtsam_unstable/nonlinear/Expression.h +++ b/gtsam_unstable/nonlinear/Expression.h @@ -113,7 +113,7 @@ public: Augmented augmented(const Values& values) const { #define REVERSE_AD #ifdef REVERSE_AD - boost::shared_ptr > trace = root_->traceExecution(values); + boost::shared_ptr > trace(root_->traceExecution(values)); Augmented augmented(trace->value()); trace->reverseAD(augmented.jacobians()); return augmented;