BloombergLP::bdlc::operator-

Return the signed distance between the specified lhs and rhs.

Synopsis

Declared in <bdlc_compactedarray.h>

template<class TYPE>
std::ptrdiff_t
operator-(
    CompactedArray_ConstIterator<TYPE> const& lhs,
    CompactedArray_ConstIterator<TYPE> const& rhs);

Description

The behavior is undefined unless lhs and rhs reference the same array. Note that the return value is positive when a positive number of rhs++ invocations would result in lhs == rhs, and negative when a positive number of rhs-- invocations would result in lhs == rhs.

Return Value

signed distance from rhs to lhs

Parameters

NameDescription
lhsleft-hand-side iterator
rhsright-hand-side iterator