diff --git a/gtsam/inference/FactorGraph.h b/gtsam/inference/FactorGraph.h index caaa13cae..f1dc37c37 100644 --- a/gtsam/inference/FactorGraph.h +++ b/gtsam/inference/FactorGraph.h @@ -29,7 +29,10 @@ #include // for Eigen::aligned_allocator +#ifdef GTSAM_USE_BOOST_FEATURES #include +#endif + #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION #include #include @@ -212,6 +215,7 @@ class FactorGraph { push_back(factor); } +#ifdef GTSAM_USE_BOOST_FEATURES /// `+=` works well with boost::assign list inserter. template typename std::enable_if< @@ -221,6 +225,7 @@ class FactorGraph { return boost::assign::make_list_inserter(RefCallPushBack(*this))( factor); } +#endif /// @} /// @name Adding via iterators @@ -271,6 +276,7 @@ class FactorGraph { push_back(factorOrContainer); } +#ifdef GTSAM_USE_BOOST_FEATURES /** * Add a factor or container of factors, including STL collections, * BayesTrees, etc. @@ -281,6 +287,7 @@ class FactorGraph { return boost::assign::make_list_inserter(CRefCallPushBack(*this))( factorOrContainer); } +#endif /// @} /// @name Specialized versions diff --git a/gtsam/inference/Ordering.h b/gtsam/inference/Ordering.h index 634fb64e2..884a93f0d 100644 --- a/gtsam/inference/Ordering.h +++ b/gtsam/inference/Ordering.h @@ -25,7 +25,10 @@ #include #include +#ifdef GTSAM_USE_BOOST_FEATURES #include +#endif + #include #include