[#operator_lt-079]
= operator&lt;
:mrdocs:

Less&hyphen;than operators

== Synopses

Declared in `&lt;netaddress&period;h&gt;`

Orders outpoints by transaction hash, then output index&period;


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

[.small]#xref:operator_lt-073.adoc[_» more&period;&period;&period;_]#

Order two subnets&period;


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

[.small]#xref:operator_lt-078.adoc[_» more&period;&period;&period;_]#

Order two addresses&period;


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

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

Order two services&period;


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

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

Orders two inventory entries by type and then by hash&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_lt-04.adoc[operator&lt;](
    xref:CInv.adoc[CInv] const& a,
    xref:CInv.adoc[CInv] const& b);
----

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

Check whether the first feerate is strictly lower than the second&period;


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

[.small]#xref:operator_lt-068.adoc[_» more&period;&period;&period;_]#

Order two public keys lexicographically by their serialized bytes&period;


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

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

Order two extended public keys by public key, then by chain code&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_lt-0e.adoc[operator&lt;](
    xref:CExtPubKey.adoc[CExtPubKey] const& a,
    xref:CExtPubKey.adoc[CExtPubKey] const& b);
----

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

Order two KeyOriginInfo by fingerprint, then path length, then path&period;


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

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

Order two destinations by their scripts&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_lt-063.adoc[operator&lt;](
    xref:CNoDestination.adoc[CNoDestination] const& a,
    xref:CNoDestination.adoc[CNoDestination] const& b);
----

[.small]#xref:operator_lt-063.adoc[_» more&period;&period;&period;_]#

Order two destinations by their public keys&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_lt-07e.adoc[operator&lt;](
    xref:PubKeyDestination.adoc[PubKeyDestination] const& a,
    xref:PubKeyDestination.adoc[PubKeyDestination] const& b);
----

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

Order two destinations by version, then by program&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:operator_lt-0d.adoc[operator&lt;](
    xref:WitnessUnknown.adoc[WitnessUnknown] const& w1,
    xref:WitnessUnknown.adoc[WitnessUnknown] const& w2);
----

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

== Return Value

* True if a orders before b&period;
* True when `a` orders before `b`&period;
* true if `a` sorts before `b` by type and then by hash&period;
* True if a&apos;s feerate is lower than b&apos;s&period;
* true if a sorts before b&period;
* true if a orders before b&period;
* True if `a`&apos;s script orders before `b`&apos;s&period;
* True if `a`&apos;s public key orders before `b`&apos;s&period;
* True if `w1` orders before `w2`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| The left&hyphen;hand outpoint&period;
| *b*
| The right&hyphen;hand outpoint&period;
| *w1*
| The first destination&period;
| *w2*
| The second destination&period;
|===


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