Remove all items for which the specified predicate returns true.
Declared in <bdlcc_timequeue.h>
void
removeIf(
bsl::function<bool(DATA const&)> const& predicate,
int* newLength = 0,
bsls::TimeInterval* newMinTime = 0,
bsl::vector<TimeQueueItem<DATA>>* removedItems = 0);
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.
| 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 |