[#bsl-operator_minus-06]
= xref:bsl.adoc[bsl]::operator&hyphen;
:relfileprefix: ../
:mrdocs:

Subtraction operators

== Synopses

Declared in `&lt;bslstl&lowbar;vector&period;h&gt;`

Return the distance from the specified `i` iterator to the specified `s` sentinel&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
auto
xref:bsl/operator_minus-05.adoc[operator&hyphen;](
    auto s,
    xref:bsl/vector_UintPtrConversionIterator.adoc[vector&lowbar;UintPtrConversionIterator] i)
requires random&lowbar;access&lowbar;iterator&lt;ITERATOR&gt;;
----

[.small]#xref:bsl/operator_minus-05.adoc[_» more&period;&period;&period;_]#

Return the distance between the specified `lhs` iterator and the specified `rhs` iterator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/vector_UintPtrConversionIterator/difference_type.adoc[difference&lowbar;type]
xref:bsl/operator_minus-00.adoc[operator&hyphen;](
    xref:bsl/vector_UintPtrConversionIterator.adoc[vector&lowbar;UintPtrConversionIterator] const& lhs,
    xref:bsl/vector_UintPtrConversionIterator.adoc[vector&lowbar;UintPtrConversionIterator] const& rhs)
requires requires &lcub; lhs&period;d&lowbar;iter &hyphen; rhs&period;d&lowbar;iter&semi; &rcub;;
----

[.small]#xref:bsl/operator_minus-00.adoc[_» more&period;&period;&period;_]#

== Return Value

* distance from the iterator to the sentinel
* signed distance from `rhs` to `lhs`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| sentinel marking the end of the range
| *i*
| iterator from which the distance is measured
| *lhs*
| left&hyphen;hand operand
| *rhs*
| right&hyphen;hand operand
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
