diff --git a/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp b/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp index 163139543..6441b78a6 100644 --- a/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp +++ b/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp @@ -322,27 +322,11 @@ TEST(ExpressionFactor, composeTernary) { namespace mpl = boost::mpl; -template -struct ProtoTrace: public ProtoTrace::type> { - - typedef typename mpl::front::type A; - -}; - -/// Recursive Trace Class, Base case -template<> -struct ProtoTrace > { -}; - -template<> -struct ProtoTrace { -}; - -/// Recursive Trace Class, Primary Template +/// Recursive Trace Class template -struct store: More { +struct Trace: More { // define dimensions - static const size_t m = 3; + static const size_t m = 2; static const size_t n = A::dimension; // define fixed size Jacobian matrix types @@ -354,18 +338,26 @@ struct store: More { JacobianTA dTdA; }; -typedef mpl::vector MyTypes; - -template struct Incomplete; #include #include -#include namespace MPL = mpl::placeholders; -typedef mpl::reverse_fold >::type Generated; -Generated generated; -//Incomplete incomplete; + +/// Recursive Trace Class Generator +template +struct GenerateTrace { + typedef typename mpl::fold >::type type; +}; + #include +template struct Incomplete; + +typedef mpl::vector MyTypes; +typedef GenerateTrace::type Generated; +Incomplete incomplete; +BOOST_MPL_ASSERT((boost::is_same< Matrix25, Generated::JacobianTA >)); + +Generated generated; typedef mpl::vector1 OneType; typedef mpl::pop_front::type Empty; @@ -376,21 +368,11 @@ typedef mpl::pop_front::type Bad; #include #include #include -#include //#include -BOOST_STATIC_ASSERT((mpl::plus,mpl::int_<3> >::type::value==5)); - -typedef mpl::vector0<> List0; -typedef ProtoTrace Proto0; -//typedef ProtoTrace > Proto0; -//typedef mpl::print::type Dbg; -//incomplete > proto0; - typedef struct { } Expected0; BOOST_MPL_ASSERT((boost::is_same< Expected0, Expected0 >)); -//BOOST_MPL_ASSERT((boost::is_same< ProtoTrace, ProtoTrace >)); /* ************************************************************************* */ int main() {