From 0ee985b629b537313fcf62ba3016e42650262e35 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sun, 5 Feb 2023 19:45:03 -0800 Subject: [PATCH] No more list_inserter --- gtsam/inference/FactorGraph.h | 7 +++++++ gtsam/inference/Ordering.h | 3 +++ 2 files changed, 10 insertions(+) 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