diff --git a/gtsam/nonlinear/Values.h b/gtsam/nonlinear/Values.h index be2df9056..725a2f107 100644 --- a/gtsam/nonlinear/Values.h +++ b/gtsam/nonlinear/Values.h @@ -338,7 +338,8 @@ namespace gtsam { // supplied \c filter function. template static bool filterHelper(const std::function filter, const ConstKeyValuePair& key_value) { - BOOST_STATIC_ASSERT((!boost::is_same::value)); + // static_assert if ValueType is not Value + static_assert(std::is_same::value, "ValueType must be type: Value"); // Filter and check the type return filter(key_value.key) && (dynamic_cast*>(&key_value.value)); }