[#operator_eq-073]
= operator&equals;&equals;
:mrdocs:

Equality operators

== Synopses

Declared in `&lt;arith&lowbar;uint256&period;h&gt;`

Compares two positions for equality of file index and offset&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0c6.adoc[operator&equals;&equals;](
    xref:FlatFilePos.adoc[FlatFilePos] const& a,
    xref:FlatFilePos.adoc[FlatFilePos] const& b);
----

[.small]#xref:operator_eq-0c6.adoc[_» more&period;&period;&period;_]#

Compare two destinations for equality by version and program&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-04e.adoc[operator&equals;&equals;](
    xref:WitnessUnknown.adoc[WitnessUnknown] const& w1,
    xref:WitnessUnknown.adoc[WitnessUnknown] const& w2);
----

[.small]#xref:operator_eq-04e.adoc[_» more&period;&period;&period;_]#

Compare two destinations for equality by their public keys&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-045.adoc[operator&equals;&equals;](
    xref:PubKeyDestination.adoc[PubKeyDestination] const& a,
    xref:PubKeyDestination.adoc[PubKeyDestination] const& b);
----

[.small]#xref:operator_eq-045.adoc[_» more&period;&period;&period;_]#

Compare two destinations for equality by their scripts&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-06f.adoc[operator&equals;&equals;](
    xref:CNoDestination.adoc[CNoDestination] const& a,
    xref:CNoDestination.adoc[CNoDestination] const& b);
----

[.small]#xref:operator_eq-06f.adoc[_» more&period;&period;&period;_]#

Test two fee rates for equality by their fee&sol;vsize ratio&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0ad.adoc[operator&equals;&equals;](
    xref:CFeeRate.adoc[CFeeRate] const& a,
    xref:CFeeRate.adoc[CFeeRate] const& b) noexcept;
----

[.small]#xref:operator_eq-0ad.adoc[_» more&period;&period;&period;_]#

Compare two extended keys for equality of all fields&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-005.adoc[operator&equals;&equals;](
    xref:CExtKey.adoc[CExtKey] const& a,
    xref:CExtKey.adoc[CExtKey] const& b);
----

[.small]#xref:operator_eq-005.adoc[_» more&period;&period;&period;_]#

Compare two private keys for equality of compression flag and key material&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0e7.adoc[operator&equals;&equals;](
    xref:CKey.adoc[CKey] const& a,
    xref:CKey.adoc[CKey] const& b);
----

[.small]#xref:operator_eq-0e7.adoc[_» more&period;&period;&period;_]#

Compare two KeyOriginInfo for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
bool
xref:operator_eq-02.adoc[operator&equals;&equals;](
    xref:KeyOriginInfo.adoc[KeyOriginInfo] const& a,
    xref:KeyOriginInfo.adoc[KeyOriginInfo] const& b) = default;
----

[.small]#xref:operator_eq-02.adoc[_» more&period;&period;&period;_]#

Compare two extended public keys for equality of all fields (excluding version)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-012.adoc[operator&equals;&equals;](
    xref:CExtPubKey.adoc[CExtPubKey] const& a,
    xref:CExtPubKey.adoc[CExtPubKey] const& b);
----

[.small]#xref:operator_eq-012.adoc[_» more&period;&period;&period;_]#

Compare two ellswift public keys for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-00b.adoc[operator&equals;&equals;](
    xref:EllSwiftPubKey.adoc[EllSwiftPubKey] const& a,
    xref:EllSwiftPubKey.adoc[EllSwiftPubKey] const& b);
----

[.small]#xref:operator_eq-00b.adoc[_» more&period;&period;&period;_]#

Comparator implementation&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-05d.adoc[operator&equals;&equals;](
    xref:CPubKey.adoc[CPubKey] const& a,
    xref:CPubKey.adoc[CPubKey] const& b);
----

[.small]#xref:operator_eq-05d.adoc[_» more&period;&period;&period;_]#

Check whether two wrapped FeeFracs are equal (same fee and same size)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-039.adoc[operator&equals;&equals;](
    xref:ByRatioNegSize.adoc[ByRatioNegSize] const& a,
    xref:ByRatioNegSize.adoc[ByRatioNegSize] const& b) noexcept;
----

[.small]#xref:operator_eq-039.adoc[_» more&period;&period;&period;_]#

Compare two wrapped FeeFracs for equal feerate&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0cc.adoc[operator&equals;&equals;](
    xref:ByRatio.adoc[ByRatio] const& a,
    xref:ByRatio.adoc[ByRatio] const& b) noexcept;
----

[.small]#xref:operator_eq-0cc.adoc[_» more&period;&period;&period;_]#

Check if two FeeFrac objects are equal (both same fee and same size)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-03b.adoc[operator&equals;&equals;](
    xref:FeeFrac.adoc[FeeFrac] const& a,
    xref:FeeFrac.adoc[FeeFrac] const& b) noexcept;
----

[.small]#xref:operator_eq-03b.adoc[_» more&period;&period;&period;_]#

Equality comparison between two deques (only compares size&plus;contents, not capacity)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0a6.adoc[operator&equals;&equals;](
    xref:VecDeque.adoc[VecDeque] const& a,
    xref:VecDeque.adoc[VecDeque] const& b);
----

[.small]#xref:operator_eq-0a6.adoc[_» more&period;&period;&period;_]#

Compares two secure allocators for equality&semi; they are always equal since the allocator is stateless&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-06b.adoc[operator&equals;&equals;](
    xref:secure_allocator.adoc[secure&lowbar;allocator] const& a,
    xref:secure_allocator.adoc[secure&lowbar;allocator&lt;U&gt;] const& b) noexcept;
----

[.small]#xref:operator_eq-06b.adoc[_» more&period;&period;&period;_]#

Compares two outpoints for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-076.adoc[operator&equals;&equals;](
    xref:COutPoint.adoc[COutPoint] const& a,
    xref:COutPoint.adoc[COutPoint] const& b);
----

[.small]#xref:operator_eq-076.adoc[_» more&period;&period;&period;_]#

Tests whether two big integers are equal&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-007d.adoc[operator&equals;&equals;](
    xref:base_uint-02.adoc[base&lowbar;uint&lt;256&gt;] const& a,
    xref:base_uint-02.adoc[base&lowbar;uint&lt;256&gt;] const& b);
----

[.small]#xref:operator_eq-007d.adoc[_» more&period;&period;&period;_]#

Tests whether a big integer equals a 64&hyphen;bit value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-050.adoc[operator&equals;&equals;](
    xref:base_uint-02.adoc[base&lowbar;uint&lt;256&gt;] const& a,
    uint64&lowbar;t b);
----

[.small]#xref:operator_eq-050.adoc[_» more&period;&period;&period;_]#

Tests whether two big integers are equal&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-06d.adoc[operator&equals;&equals;](
    xref:base_uint-02.adoc[base&lowbar;uint] const& a,
    xref:base_uint-02.adoc[base&lowbar;uint] const& b);
----

[.small]#xref:operator_eq-06d.adoc[_» more&period;&period;&period;_]#

Tests whether a big integer equals a 64&hyphen;bit value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0ae.adoc[operator&equals;&equals;](
    xref:base_uint-02.adoc[base&lowbar;uint] const& a,
    uint64&lowbar;t b);
----

[.small]#xref:operator_eq-0ae.adoc[_» more&period;&period;&period;_]#

Returns whether two addresses have equal time, service flags, and endpoint&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0c2.adoc[operator&equals;&equals;](
    xref:CAddress.adoc[CAddress] const& a,
    xref:CAddress.adoc[CAddress] const& b);
----

[.small]#xref:operator_eq-0c2.adoc[_» more&period;&period;&period;_]#

Compares two allocators for equality&semi; they are always equal since the allocator is stateless&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-038.adoc[operator&equals;&equals;](
    xref:zero_after_free_allocator-01.adoc[zero&lowbar;after&lowbar;free&lowbar;allocator&lt;byte&gt;] const& a,
    xref:zero_after_free_allocator-01.adoc[zero&lowbar;after&lowbar;free&lowbar;allocator&lt;U&gt;] const& b) noexcept;
----

[.small]#xref:operator_eq-038.adoc[_» more&period;&period;&period;_]#

Compares two allocators for equality&semi; they are always equal since the allocator is stateless&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-01f.adoc[operator&equals;&equals;](
    xref:zero_after_free_allocator-01.adoc[zero&lowbar;after&lowbar;free&lowbar;allocator] const& a,
    xref:zero_after_free_allocator-01.adoc[zero&lowbar;after&lowbar;free&lowbar;allocator&lt;U&gt;] const& b) noexcept;
----

[.small]#xref:operator_eq-01f.adoc[_» more&period;&period;&period;_]#

Compare two services for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-007e.adoc[operator&equals;&equals;](
    xref:CService.adoc[CService] const& a,
    xref:CService.adoc[CService] const& b);
----

[.small]#xref:operator_eq-007e.adoc[_» more&period;&period;&period;_]#

Compare two addresses for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0d.adoc[operator&equals;&equals;](
    xref:CNetAddr.adoc[CNetAddr] const& a,
    xref:CNetAddr.adoc[CNetAddr] const& b);
----

[.small]#xref:operator_eq-0d.adoc[_» more&period;&period;&period;_]#

Compare two subnets for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-09.adoc[operator&equals;&equals;](
    xref:CSubNet.adoc[CSubNet] const& a,
    xref:CSubNet.adoc[CSubNet] const& b);
----

[.small]#xref:operator_eq-09.adoc[_» more&period;&period;&period;_]#

Compares two pool allocators for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class T1,
    class T2,
    std::size&lowbar;t MAX&lowbar;BLOCK&lowbar;SIZE&lowbar;BYTES,
    std::size&lowbar;t ALIGN&lowbar;BYTES&gt;
bool
xref:operator_eq-019.adoc[operator&equals;&equals;](
    xref:PoolAllocator-0e.adoc[PoolAllocator&lt;T1, MAX&lowbar;BLOCK&lowbar;SIZE&lowbar;BYTES, ALIGN&lowbar;BYTES&gt;] const& a,
    xref:PoolAllocator-0e.adoc[PoolAllocator&lt;T2, MAX&lowbar;BLOCK&lowbar;SIZE&lowbar;BYTES, ALIGN&lowbar;BYTES&gt;] const& b) noexcept;
----

[.small]#xref:operator_eq-019.adoc[_» more&period;&period;&period;_]#

Compares two transactions for equality by witness hash&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-05b.adoc[operator&equals;&equals;](
    xref:CTransaction.adoc[CTransaction] const& a,
    xref:CTransaction.adoc[CTransaction] const& b);
----

[.small]#xref:operator_eq-05b.adoc[_» more&period;&period;&period;_]#

Compares two outputs for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-0ee.adoc[operator&equals;&equals;](
    xref:CTxOut.adoc[CTxOut] const& a,
    xref:CTxOut.adoc[CTxOut] const& b);
----

[.small]#xref:operator_eq-0ee.adoc[_» more&period;&period;&period;_]#

Compares two inputs for equality&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_eq-07a.adoc[operator&equals;&equals;](
    xref:CTxIn.adoc[CTxIn] const& a,
    xref:CTxIn.adoc[CTxIn] const& b);
----

[.small]#xref:operator_eq-07a.adoc[_» more&period;&period;&period;_]#

== Return Value

* true if both the file index and offset are equal&period;
* True if both hold equal versions and programs&period;
* True if both hold equal public keys&period;
* True if both hold equal scripts&period;
* `true` if the fee rates are equal&period;
* true if all fields are equal&period;
* true if both keys have the same compression flag and byte data&period;
* true if both the fingerprint and path are equal&period;
* true if depth, fingerprint, child index, chain code and pubkey are equal&period;
* true if both keys have identical bytes&period;
* true if both public keys have identical serialized bytes&period;
* True if the underlying FeeFracs are equal&period;
* True if the two FeeFracs have the same feerate&period;
* True if both the fee and the size are equal&period;
* true if both deques have the same size and equal elements in order&period;
* Always true&period;
* True if both the hash and index are equal&period;
* True if `a` and `b` are equal, otherwise false&period;
* True if `a` equals `b,` otherwise false&period;
* true if both addresses have equal time, service flags, and endpoint&period;
* True when both services are equal&period;
* True when both addresses are equal&period;
* True when both subnets are equal&period;
* True when both allocators share the same backing resource&period;
* True if both transactions have the same witness hash&period;
* True if both the value and spending script are equal&period;
* True if the outpoint, signature script and sequence all match&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| The first position&period;
| *b*
| The second position&period;
| *w1*
| The first destination&period;
| *w2*
| The second destination&period;
|===


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