BloombergLP::bdlcc::Queue::tryPopBack

tryPopBack overloads

Synopses

Declared in <bdlcc_queue.h>

Remove up to the specified maxNumItems from the back of this queue. Optionally specify a buffer into which the items removed from the queue are loaded. If buffer is non-null, the removed items are appended to it as if by repeated application of buffer->push_back(popBack()) while the queue is not empty and maxNumItems have not yet been removed. This method never blocks. The behavior is undefined unless maxNumItems >= 0. Note that the ordering of the items in *buffer after the call is the reverse of the ordering they had in the queue.

void
tryPopBack(int maxNumItems);
» more...

If this queue is non-empty, remove the last item, load that item into the specified buffer, and return 0 indicating success. If this queue is empty, return a non-zero value with no effect on buffer or the state of this queue. This method never blocks.

int
tryPopBack(TYPE* buffer);
» more...

Same as the preceding overload, appending removed items to buffer.

void
tryPopBack(
    int maxNumItems,
    bsl::vector<TYPE>* buffer);
» more...

Same as the preceding overload, appending removed items to buffer.

void
tryPopBack(
    int maxNumItems,
    std::pmr::vector<TYPE>* buffer);
» more...

Same as the preceding overload, appending removed items to buffer.

void
tryPopBack(
    int maxNumItems,
    std::vector<TYPE>* buffer);
» more...