is_same
parent
2828879d02
commit
8ecb7d5367
|
|
@ -338,7 +338,8 @@ namespace gtsam {
|
|||
// supplied \c filter function.
|
||||
template<class ValueType>
|
||||
static bool filterHelper(const std::function<bool(Key)> filter, const ConstKeyValuePair& key_value) {
|
||||
BOOST_STATIC_ASSERT((!boost::is_same<ValueType, Value>::value));
|
||||
// static_assert if ValueType is not Value
|
||||
static_assert(std::is_same<Value, ValueType>::value, "ValueType must be type: Value");
|
||||
// Filter and check the type
|
||||
return filter(key_value.key) && (dynamic_cast<const GenericValue<ValueType>*>(&key_value.value));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue