[#BloombergLP-bdlc-operator_minus-0a4]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::operator&hyphen;
:relfileprefix: ../../
:mrdocs:

Subtraction operators

== Synopses

Declared in `&lt;bdlc&lowbar;bitarray&period;h&gt;`

Return the value that is the bitwise MINUS of the specified `lhs` and `rhs` arrays&period; The length of the resulting bit array will be the maximum of that of `lhs` and `rhs`, with any unmatched high&hyphen;order `lhs` bits copied unchanged, and any unmatched high&hyphen;order `rhs` bits set to 0&period; Note that this behavior is consistent with zero&hyphen;extending a copy of the shorter array&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/BitArray.adoc[bdlc::BitArray]
xref:BloombergLP/bdlc/operator_minus-0a9.adoc[operator&hyphen;](
    xref:BloombergLP/bdlc/BitArray.adoc[BitArray] const& lhs,
    xref:BloombergLP/bdlc/BitArray.adoc[BitArray] const& rhs);
----

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

Return the signed distance between two iterators (see free `operator&hyphen;`)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
std::ptrdiff&lowbar;t
xref:BloombergLP/bdlc/operator_minus-0af.adoc[operator&hyphen;](
    xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[CompactedArray&lowbar;ConstIterator] const&,
    xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[CompactedArray&lowbar;ConstIterator] const&);
----

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
std::ptrdiff&lowbar;t
xref:BloombergLP/bdlc/operator_minus-05.adoc[operator&hyphen;&lt;&gt;](
    xref:BloombergLP/bdlc/PackedIntArrayConstIterator.adoc[PackedIntArrayConstIterator] const&,
    xref:BloombergLP/bdlc/PackedIntArrayConstIterator.adoc[PackedIntArrayConstIterator] const&);
----

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

Return an iterator at the negated specified offset from the given iterator (see free `operator&hyphen;`)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[CompactedArray&lowbar;ConstIterator&lt;TYPE&gt;]
xref:BloombergLP/bdlc/operator_minus-01.adoc[operator&hyphen;](
    xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[CompactedArray&lowbar;ConstIterator&lt;TYPE&gt;] const&,
    std::ptrdiff&lowbar;t);
----

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

Return an iterator referencing the location at the specified `offset` from the location referenced by the specified `iterator`&period; The returned iterator, `it`, referencing a `CompactedArray` `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless `CompactedArray&lowbar;ConstIterator() !&equals; iterator` and `0 &lt;&equals; iterator &hyphen; array&period;begin() &hyphen; offset &lt;&equals; array&period;length()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[bdlc::CompactedArray&lowbar;ConstIterator&lt;TYPE&gt;]
xref:BloombergLP/bdlc/operator_minus-03.adoc[operator&hyphen;](
    xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[CompactedArray&lowbar;ConstIterator&lt;TYPE&gt;] const& iterator,
    std::ptrdiff&lowbar;t offset);
----

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

Return the number of elements between the specified `lhs` and `rhs` as a signed value&period; The behavior is undefined unless `lhs` and `rhs` reference the same array&period; Note that the return value is positive when a positive number of `rhs&plus;&plus;` invocations would result in `lhs &equals;&equals; rhs`, and negative when a positive number of `rhs&hyphen;&hyphen;` invocations would result in `lhs &equals;&equals; rhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
std::ptrdiff&lowbar;t
xref:BloombergLP/bdlc/operator_minus-08.adoc[operator&hyphen;](
    xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[CompactedArray&lowbar;ConstIterator&lt;TYPE&gt;] const& lhs,
    xref:BloombergLP/bdlc/CompactedArray_ConstIterator.adoc[CompactedArray&lowbar;ConstIterator&lt;TYPE&gt;] const& rhs);
----

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

Return the number of elements between specified `lhs` and `rhs`&period; The behavior is undefined unless `lhs` and `rhs` reference the same array&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
std::ptrdiff&lowbar;t
xref:BloombergLP/bdlc/operator_minus-09.adoc[operator&hyphen;](
    xref:BloombergLP/bdlc/PackedIntArrayConstIterator.adoc[PackedIntArrayConstIterator&lt;TYPE&gt;] const& lhs,
    xref:BloombergLP/bdlc/PackedIntArrayConstIterator.adoc[PackedIntArrayConstIterator&lt;TYPE&gt;] const& rhs);
----

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


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