BloombergLP::bdlc::PackedIntArrayUtil::upperBound

Return an iterator to the first element greater than value.

Synopsis

Declared in <bdlc_packedintarrayutil.h>

template<class TYPE>
static
PackedIntArrayConstIterator<TYPE>
upperBound(
    PackedIntArrayConstIterator<TYPE> first,
    PackedIntArrayConstIterator<TYPE> last,
    TYPE value);

Description

Return an iterator to the first element in the sorted range from the specified first (inclusive) to the specified last (exclusive) that compares greater than the specified value, and last if no such element exists. The behavior is undefined unless first <= last and the range is sorted.

Return Value

iterator to the first element greater than value, or last if no such element exists

Parameters

NameDescription
firstbeginning of the sorted range to search
lastend of the sorted range to search
valuevalue to compare against elements in the range