operator-

Returns the distance between two iterators.

Synopsis

Declared in <prevector.h>

difference_type
operator-(
    iterator a,
    iterator b);

NOTE

This function is a hidden friend of iterator, declared only inside that class: it can be found only through argument-dependent lookup.

Return Value

The number of elements between the two iterators.

Parameters

NameDescription
aThe left-hand iterator.
bThe right-hand iterator.