Erase all the elements in the specified vector vec that satisfy the specified predicate predicate. Return the number of elements erased.
Synopsis
Declared in <bslstl_vector.h>
template<
class VALUE_TYPE,
class ALLOCATOR,
class PREDICATE>
vector<VALUE_TYPE, ALLOCATOR>::size_type
erase_if(
vector<VALUE_TYPE, ALLOCATOR>& vec,
PREDICATE predicate);
Return Value
number of elements erased
Parameters
Name |
Description |
vec |
vector to modify |
predicate |
unary predicate selecting elements to erase |
Created with MrDocs