diff --git a/gtsam/inference/FactorGraph.h b/gtsam/inference/FactorGraph.h index 4f1c73dcb..03b930241 100644 --- a/gtsam/inference/FactorGraph.h +++ b/gtsam/inference/FactorGraph.h @@ -26,7 +26,8 @@ #include #include #include -#include +#include +#include #include #include @@ -149,7 +150,7 @@ namespace gtsam { /** Add a factor directly using a shared_ptr */ template - typename std::enable_if::value>::type + typename boost::enable_if>::type push_back(boost::shared_ptr factor) { factors_.push_back(boost::shared_ptr(factor)); } @@ -159,13 +160,13 @@ namespace gtsam { /** push back many factors with an iterator over shared_ptr (factors are not copied) */ template - typename std::enable_if::value>::type + typename boost::enable_if>::type push_back(ITERATOR firstFactor, ITERATOR lastFactor) { factors_.insert(end(), firstFactor, lastFactor); } /** push back many factors as shared_ptr's in a container (factors are not copied) */ template - typename std::enable_if::value>::type + typename boost::enable_if>::type push_back(const CONTAINER& container) { push_back(container.begin(), container.end()); } @@ -173,7 +174,7 @@ namespace gtsam { /** push back a BayesTree as a collection of factors. NOTE: This should be hidden in derived * classes in favor of a type-specialized version that calls this templated function. */ template - typename std::enable_if::value>::type + typename boost::enable_if>::type push_back(const BayesTree& bayesTree) { bayesTree.addFactorsToGraph(*this); } @@ -189,7 +190,7 @@ namespace gtsam { /** Add a factor directly using a shared_ptr */ template - typename std::enable_if::value, + typename boost::enable_if, boost::assign::list_inserter > >::type operator+=(boost::shared_ptr& factor) { return boost::assign::make_list_inserter(RefCallPushBack(*this))(factor); @@ -215,7 +216,7 @@ namespace gtsam { ///** push back many factors as shared_ptr's in a container (factors are not copied) */ //template - //typename std::enable_if::value, + //typename boost::enable_if, // boost::assign::list_inserter > >::type // operator+=(const CONTAINER& container) { // return boost::assign::make_list_inserter(CRefCallPushBack(*this)); @@ -232,13 +233,13 @@ namespace gtsam { /** Add a factor by value, will be copy-constructed (use push_back with a shared_ptr to avoid * the copy). */ template - typename std::enable_if::value>::type + typename boost::enable_if>::type push_back(const DERIVEDFACTOR& factor) { factors_.push_back(boost::make_shared(factor)); } /** push back many factors with an iterator over plain factors (factors are copied) */ template - typename std::enable_if::value>::type + typename boost::enable_if>::type push_back(ITERATOR firstFactor, ITERATOR lastFactor) { for(ITERATOR f = firstFactor; f != lastFactor; ++f) push_back(*f); @@ -246,7 +247,7 @@ namespace gtsam { /** push back many factors as non-pointer objects in a container (factors are copied) */ template - typename std::enable_if::value>::type + typename boost::enable_if>::type push_back(const CONTAINER& container) { push_back(container.begin(), container.end()); }