diff --git a/gtsam/base/Group.h b/gtsam/base/Group.h index 89fa8248c..5c0f92b4e 100644 --- a/gtsam/base/Group.h +++ b/gtsam/base/Group.h @@ -51,7 +51,7 @@ public: BOOST_CONCEPT_USAGE(IsGroup) { BOOST_STATIC_ASSERT_MSG( - (boost::is_base_of::value), + (std::is_base_of::value), "This type's structure_category trait does not assert it as a group (or derived)"); e = traits::Identity(); e = traits::Compose(g, h); diff --git a/gtsam/base/Lie.h b/gtsam/base/Lie.h index 1b574816a..3ea5e94a8 100644 --- a/gtsam/base/Lie.h +++ b/gtsam/base/Lie.h @@ -266,7 +266,7 @@ public: BOOST_CONCEPT_USAGE(IsLieGroup) { BOOST_STATIC_ASSERT_MSG( - (boost::is_base_of::value), + (std::is_base_of::value), "This type's trait does not assert it is a Lie group (or derived)"); // group opertations with Jacobians diff --git a/gtsam/base/Manifold.h b/gtsam/base/Manifold.h index 962dc8269..55aebd10f 100644 --- a/gtsam/base/Manifold.h +++ b/gtsam/base/Manifold.h @@ -144,7 +144,7 @@ public: BOOST_CONCEPT_USAGE(IsManifold) { BOOST_STATIC_ASSERT_MSG( - (boost::is_base_of::value), + (std::is_base_of::value), "This type's structure_category trait does not assert it as a manifold (or derived)"); BOOST_STATIC_ASSERT(TangentVector::SizeAtCompileTime == dim); diff --git a/gtsam/base/VectorSpace.h b/gtsam/base/VectorSpace.h index 9fbd581bb..9246ad871 100644 --- a/gtsam/base/VectorSpace.h +++ b/gtsam/base/VectorSpace.h @@ -474,7 +474,7 @@ public: BOOST_CONCEPT_USAGE(IsVectorSpace) { BOOST_STATIC_ASSERT_MSG( - (boost::is_base_of::value), + (std::is_base_of::value), "This type's trait does not assert it as a vector space (or derived)"); r = p + q; r = -p; diff --git a/gtsam/base/numericalDerivative.h b/gtsam/base/numericalDerivative.h index 8c9934d77..8183841b2 100644 --- a/gtsam/base/numericalDerivative.h +++ b/gtsam/base/numericalDerivative.h @@ -71,10 +71,10 @@ typename Eigen::Matrix numericalGradient( std::function h, const X& x, double delta = 1e-5) { double factor = 1.0 / (2.0 * delta); - BOOST_STATIC_ASSERT_MSG( - (boost::is_base_of::structure_category>::value), + static_assert( + (std::is_base_of::structure_category>::value), "Template argument X must be a manifold type."); - BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or N must be specified."); + static_assert(N>0, "Template argument X must be fixed-size type or N must be specified."); // Prepare a tangent vector to perturb x with, only works for fixed size typename traits::TangentVector d; @@ -111,13 +111,13 @@ typename internal::FixedSizeMatrix::type numericalDerivative11( std::function h, const X& x, double delta = 1e-5) { typedef typename internal::FixedSizeMatrix::type Matrix; - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); typedef traits TraitsY; - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X must be a manifold type."); - BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or N must be specified."); + static_assert(N>0, "Template argument X must be fixed-size type or N must be specified."); typedef traits TraitsX; // get value at x, and corresponding chart @@ -165,9 +165,9 @@ typename internal::FixedSizeMatrix::type numericalDerivative11(Y (*h)(const template::dimension> typename internal::FixedSizeMatrix::type numericalDerivative21(const std::function& h, const X1& x1, const X2& x2, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::placeholders::_1, std::cref(x2)), x1, delta); @@ -194,9 +194,9 @@ typename internal::FixedSizeMatrix::type numericalDerivative21(Y (*h)(cons template::dimension> typename internal::FixedSizeMatrix::type numericalDerivative22(std::function h, const X1& x1, const X2& x2, double delta = 1e-5) { -// BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), +// static_assert( (std::is_base_of::structure_category>::value), // "Template argument X1 must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X2 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::placeholders::_1), x2, delta); @@ -226,9 +226,9 @@ template::dimension> typename internal::FixedSizeMatrix::type numericalDerivative31( std::function h, const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3)), @@ -259,9 +259,9 @@ template::dimension> typename internal::FixedSizeMatrix::type numericalDerivative32( std::function h, const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X2 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3)), @@ -292,9 +292,9 @@ template::dimension> typename internal::FixedSizeMatrix::type numericalDerivative33( std::function h, const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X3 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1), @@ -325,9 +325,9 @@ template::di typename internal::FixedSizeMatrix::type numericalDerivative41( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), @@ -359,9 +359,9 @@ template::di typename internal::FixedSizeMatrix::type numericalDerivative42( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X2 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), @@ -393,9 +393,9 @@ template::di typename internal::FixedSizeMatrix::type numericalDerivative43( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X3 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, @@ -427,9 +427,9 @@ template::di typename internal::FixedSizeMatrix::type numericalDerivative44( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X4 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), @@ -462,9 +462,9 @@ template::type numericalDerivative51( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), @@ -498,9 +498,9 @@ template::type numericalDerivative52( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), @@ -534,9 +534,9 @@ template::type numericalDerivative53( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, @@ -570,9 +570,9 @@ template::type numericalDerivative54( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), @@ -606,9 +606,9 @@ template::type numericalDerivative55( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), @@ -643,9 +643,9 @@ template::type numericalDerivative61( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), @@ -680,9 +680,9 @@ template::type numericalDerivative62( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), @@ -717,9 +717,9 @@ template::type numericalDerivative63( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, @@ -754,9 +754,9 @@ template::type numericalDerivative64( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), @@ -791,9 +791,9 @@ template::type numericalDerivative65( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), @@ -829,9 +829,9 @@ typename internal::FixedSizeMatrix::type numericalDerivative66( std::function h, const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument Y must be a manifold type."); - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X1 must be a manifold type."); return numericalDerivative11( std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), @@ -860,7 +860,7 @@ inline typename internal::FixedSizeMatrix::type numericalDerivative66(Y (* template inline typename internal::FixedSizeMatrix::type numericalHessian(std::function f, const X& x, double delta = 1e-5) { - BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), + static_assert( (std::is_base_of::structure_category>::value), "Template argument X must be a manifold type."); typedef Eigen::Matrix::dimension, 1> VectorD; typedef std::function F;