[#BloombergLP-bdlcc-TimeQueue-09c-removeIf] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/TimeQueue-09c.adoc[TimeQueue]::removeIf :relfileprefix: ../../../ :mrdocs: Remove all items for which the specified `predicate` returns `true`. == Synopsis Declared in `<bdlcc_timequeue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void removeIf( xref:bsl/function-0a.adoc[bsl::function<bool(DATA const&)>] const& predicate, int* newLength = 0, xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval]* newMinTime = 0, xref:bsl/vector-00d.adoc[bsl::vector<TimeQueueItem<DATA>>]* removedItems = 0); ---- == Description Remove all the items from this queue for which `predicate` returns `true`. Optionally specify `newLength`, in which to load the number of items remaining in this queue. Optionally specify `newMinTime`, in which to load the lowest remaining time value in this queue. Optionally specify a vector of `removedItems` in which to load the removed items. == Parameters [cols="1,4"] |=== | Name| Description | *predicate* | functor returning `true` for items to remove | *newLength* | if non‐null, receives the new queue length | *newMinTime* | if non‐null, receives the new minimum time | *removedItems* | if non‐null, receives the removed items |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#