diff --git a/vphysics_jolt/vjolt_util.h b/vphysics_jolt/vjolt_util.h index 4ae1a18..15e8d46 100644 --- a/vphysics_jolt/vjolt_util.h +++ b/vphysics_jolt/vjolt_util.h @@ -375,3 +375,9 @@ constexpr void EraseIf( T &c, Pred pred ) auto it = std::remove_if( c.begin(), c.end(), pred ); c.erase( it, c.end() ); } + +template< typename T, typename Value > +constexpr bool Contains( const T &c, const Value &value ) +{ + return c.find( value ) != c.end(); +}