BloombergLP::bslstl::operator-

Return an iterator rhs positions before lhs.

Synopsis

Declared in <bslstl_randomaccessiterator.h>

template<
    class T,
    class ITER_IMP,
    class TAG_TYPE>
bslstl::RandomAccessIterator<T, ITER_IMP, TAG_TYPE>
operator-(
    RandomAccessIterator<T, ITER_IMP, TAG_TYPE> const& lhs,
    std::ptrdiff_t rhs);

Description

Return an iterator to the element at the specified rhs positions before the specified lhs. The behavior is undefined unless lhs, after decrementing by rhs, is within the bounds of the underlying sequence. Note that this function is logically equivalent to: ` iter + (-rhs) `

Return Value

iterator rhs positions before lhs

Parameters

NameDescription
lhsiterator to regress from
rhsnumber of positions to regress