From 07e5475b6b47b173e101213fc9bc39c910c2def0 Mon Sep 17 00:00:00 2001 From: dellaert Date: Tue, 25 Nov 2014 11:02:54 +0100 Subject: [PATCH] Making friends... --- gtsam_unstable/nonlinear/Expression.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gtsam_unstable/nonlinear/Expression.h b/gtsam_unstable/nonlinear/Expression.h index 3b5026348..40b55c410 100644 --- a/gtsam_unstable/nonlinear/Expression.h +++ b/gtsam_unstable/nonlinear/Expression.h @@ -27,8 +27,13 @@ #include #include +class ExpressionFactorShallowTest; + namespace gtsam { +// Forward declare +template class ExpressionFactor; + /** * Expression class that supports automatic differentiation */ @@ -204,6 +209,10 @@ private: return value; } + // be very selective on who can access these private methods: + friend class ExpressionFactor; + friend class ::ExpressionFactorShallowTest; + }; // http://stackoverflow.com/questions/16260445/boost-bind-to-operator