[#bsl-erase_if-071] = xref:bsl.adoc[bsl]::erase_if :relfileprefix: ../ :mrdocs: `erase_if` overloads == Synopses Declared in `<bslstl_deque.h>` Erase all the elements in the specified deque `deq` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE_TYPE, class ALLOCATOR, class PREDICATE> deque<VALUE_TYPE, ALLOCATOR>::size_type xref:bsl/erase_if-0b.adoc[erase_if]( xref:bsl/deque-0c.adoc[deque<VALUE_TYPE, ALLOCATOR>]& deq, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-0b.adoc[_» more..._]# Erase all the elements in the specified list `l` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE, class ALLOCATOR, class PREDICATE> bsl::list<VALUE, ALLOCATOR>::size_type xref:bsl/erase_if-076.adoc[erase_if]( xref:bsl/list-054.adoc[list<VALUE, ALLOCATOR>]& l, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-076.adoc[_» more..._]# Erase all the elements in the specified vector `vec` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE_TYPE, class ALLOCATOR, class PREDICATE> vector<VALUE_TYPE, ALLOCATOR>::size_type xref:bsl/erase_if-03a.adoc[erase_if]( xref:bsl/vector-00d.adoc[vector<VALUE_TYPE, ALLOCATOR>]& vec, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-03a.adoc[_» more..._]# Erase (in‐place) all the elements from the specified `str` where the specified `pred` returns `true`, and return the number of erased elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR, class UNARY_PREDICATE> bsl::basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>::size_type xref:bsl/erase_if-0e.adoc[erase_if]( xref:bsl/basic_string-0faf.adoc[basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>]& str, UNARY_PREDICATE const& pred); ---- [.small]#xref:bsl/erase_if-0e.adoc[_» more..._]# Erase all the elements in the specified multiset `ms` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class COMPARATOR, class ALLOCATOR, class PREDICATE> bsl::multiset<KEY, COMPARATOR, ALLOCATOR>::size_type xref:bsl/erase_if-030.adoc[erase_if]( xref:bsl/multiset-03.adoc[multiset<KEY, COMPARATOR, ALLOCATOR>]& ms, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-030.adoc[_» more..._]# Erase all the elements in the specified set `s` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class COMPARATOR, class ALLOCATOR, class PREDICATE> bsl::set<KEY, COMPARATOR, ALLOCATOR>::size_type xref:bsl/erase_if-04.adoc[erase_if]( xref:bsl/set-0d.adoc[set<KEY, COMPARATOR, ALLOCATOR>]& s, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-04.adoc[_» more..._]# Erase all the elements in the specified map `m` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class VALUE, class COMPARATOR, class ALLOCATOR, class PREDICATE> bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type xref:bsl/erase_if-01.adoc[erase_if]( xref:bsl/map-0a7.adoc[map<KEY, VALUE, COMPARATOR, ALLOCATOR>]& m, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-01.adoc[_» more..._]# Erase all the elements in the specified multimap `m` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class VALUE, class COMPARATOR, class ALLOCATOR, class PREDICATE> bsl::multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::size_type xref:bsl/erase_if-0f.adoc[erase_if]( xref:bsl/multimap-0ae.adoc[multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>]& m, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-0f.adoc[_» more..._]# Erase all the elements in the specified unordered_multiset `ms` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class HASH, class EQUAL, class ALLOCATOR, class PREDICATE> bsl::unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>::size_type xref:bsl/erase_if-074.adoc[erase_if]( xref:bsl/unordered_multiset-06c.adoc[unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>]& ms, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-074.adoc[_» more..._]# Erase all the elements in the specified unordered_set `s` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class HASH, class EQUAL, class ALLOCATOR, class PREDICATE> bsl::unordered_set<KEY, HASH, EQUAL, ALLOCATOR>::size_type xref:bsl/erase_if-0d.adoc[erase_if]( xref:bsl/unordered_set-0d2d.adoc[unordered_set<KEY, HASH, EQUAL, ALLOCATOR>]& s, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-0d.adoc[_» more..._]# Erase all the elements in the specified unordered_map `m` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR, class PREDICATE> bsl::unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type xref:bsl/erase_if-0a4.adoc[erase_if]( xref:bsl/unordered_map-02b.adoc[unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>]& m, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-0a4.adoc[_» more..._]# Erase all the elements in the specified unordered_multimap `m` that satisfy the specified predicate `predicate`. Return the number of elements erased. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class VALUE, class HASH, class EQUAL, class ALLOCATOR, class PREDICATE> bsl::unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>::size_type xref:bsl/erase_if-0aa.adoc[erase_if]( xref:bsl/unordered_multimap-0b0.adoc[unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>]& m, PREDICATE predicate); ---- [.small]#xref:bsl/erase_if-0aa.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#