[#bsl-erase_if-03a] = xref:bsl.adoc[bsl]::erase_if :relfileprefix: ../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE_TYPE, class ALLOCATOR, class PREDICATE> vector<VALUE_TYPE, ALLOCATOR>::size_type erase_if( xref:bsl/vector-00d.adoc[vector<VALUE_TYPE, ALLOCATOR>]& vec, PREDICATE predicate); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#