BloombergLP::bdlcc::TimeQueue::removeIf

Remove all items for which the specified predicate returns true.

Synopsis

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);

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

NameDescription
predicatefunctor returning true for items to remove
newLengthif non-null, receives the new queue length
newMinTimeif non-null, receives the new minimum time
removedItemsif non-null, receives the removed items