[#BloombergLP-bslstl-operator_minus-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::operator&hyphen;
:relfileprefix: ../../
:mrdocs:

Subtraction operators

== Synopses

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

Return an iterator `rhs` positions before `lhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class T,
    class ITER&lowbar;IMP,
    class TAG&lowbar;TYPE&gt;
xref:BloombergLP/bslstl/RandomAccessIterator.adoc[bslstl::RandomAccessIterator&lt;T, ITER&lowbar;IMP, TAG&lowbar;TYPE&gt;]
xref:BloombergLP/bslstl/operator_minus-02.adoc[operator&hyphen;](
    xref:BloombergLP/bslstl/RandomAccessIterator.adoc[RandomAccessIterator&lt;T, ITER&lowbar;IMP, TAG&lowbar;TYPE&gt;] const& lhs,
    std::ptrdiff&lowbar;t rhs);
----

[.small]#xref:BloombergLP/bslstl/operator_minus-02.adoc[_» more&period;&period;&period;_]#

Return the distance from `rhs` to `lhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class T1,
    class T2,
    class ITER&lowbar;IMP,
    class TAG&lowbar;TYPE&gt;
std::ptrdiff&lowbar;t
xref:BloombergLP/bslstl/operator_minus-0b.adoc[operator&hyphen;](
    xref:BloombergLP/bslstl/RandomAccessIterator.adoc[RandomAccessIterator&lt;T1, ITER&lowbar;IMP, TAG&lowbar;TYPE&gt;] const& lhs,
    xref:BloombergLP/bslstl/RandomAccessIterator.adoc[RandomAccessIterator&lt;T2, ITER&lowbar;IMP, TAG&lowbar;TYPE&gt;] const& rhs);
----

[.small]#xref:BloombergLP/bslstl/operator_minus-0b.adoc[_» more&period;&period;&period;_]#

== Return Value

* iterator `rhs` positions before `lhs`
* the distance from `rhs` to `lhs`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| iterator to regress from
| *rhs*
| number of positions to regress
|===


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