diff --git a/gtsam/nonlinear/Expression-inl.h b/gtsam/nonlinear/Expression-inl.h index 1074400c9..8c3f8b24c 100644 --- a/gtsam/nonlinear/Expression-inl.h +++ b/gtsam/nonlinear/Expression-inl.h @@ -672,7 +672,6 @@ class UnaryExpression: public FunctionalNode >::type { public: - typedef T (A1::*Method)(OJ1) const; typedef boost::function Function; typedef typename FunctionalNode >::type Base; typedef typename Base::Record Record; @@ -721,7 +720,6 @@ class BinaryExpression: public: - typedef T (A1::*Method)(const A2&, OJ1, OJ2) const; typedef boost::function Function; typedef typename FunctionalNode >::type Base; typedef typename Base::Record Record; @@ -779,7 +777,6 @@ class TernaryExpression: public: - typedef T (A1::*Method)(const A2&, const A3&, OJ1, OJ2, OJ3) const; typedef boost::function Function; typedef typename FunctionalNode >::type Base; typedef typename Base::Record Record; diff --git a/gtsam/nonlinear/Expression.h b/gtsam/nonlinear/Expression.h index cf87ac2ce..fe07de039 100644 --- a/gtsam/nonlinear/Expression.h +++ b/gtsam/nonlinear/Expression.h @@ -75,7 +75,7 @@ public: /// Construct a nullary method expression template Expression(const Expression& expression, - typename UnaryExpression::Method method) : + T (A::*method)(typename UnaryExpression::OJ1) const) : root_(new UnaryExpression(boost::bind(method, _1, _2), expression)) { } @@ -89,7 +89,8 @@ public: /// Construct a unary method expression template Expression(const Expression& expression1, - typename BinaryExpression::Method method, + T (A1::*method)(const A2&, typename BinaryExpression::OJ1, + typename BinaryExpression::OJ2) const, const Expression& expression2) : root_( new BinaryExpression(boost::bind(method, _1, _2, _3, _4), @@ -106,7 +107,10 @@ public: /// Construct a binary method expression template Expression(const Expression& expression1, - typename TernaryExpression::Method method, + T (A1::*method)(const A2&, const A3&, + typename TernaryExpression::OJ1, + typename TernaryExpression::OJ2, + typename TernaryExpression::OJ3) const, const Expression& expression2, const Expression& expression3) : root_( new TernaryExpression(