Three‐way comparison operators

Synopses

Declared in <arith_uint256.h>

Orders identifiers by kind, then by wrapped value.

auto
operator<=>(
    GenTxid const& a,
    GenTxid const& b);

Performs a three‐way comparison of two big integers.

std::strong_ordering
operator<=>(
    base_uint const& a,
    base_uint const& b);

Performs a three‐way comparison of two big integers.

std::strong_ordering
operator<=>(
    base_uint<256> const& a,
    base_uint<256> const& b);

Compare two script_verify_flags. <, >, <=, and >= are auto‐generated from this.

constexpr
std::strong_ordering
operator<=>(
    script_verify_flags const& a,
    script_verify_flags const& b) noexcept;

Comparison between two deques, implementing lexicographic ordering on the contents.

std::strong_ordering
operator<=>(
    VecDeque const& a,
    VecDeque const& b);

Order two wrapped FeeFracs by feerate.

std::strong_ordering
operator<=>(
    ByRatio const& a,
    ByRatio const& b) noexcept;

Order two wrapped FeeFracs by feerate, then by reversed size.

std::strong_ordering
operator<=>(
    ByRatioNegSize const& a,
    ByRatioNegSize const& b) noexcept;

Three‐way compare two fee rates by their fee/vsize ratio.

std::strong_ordering
operator<=>(
    CFeeRate const& a,
    CFeeRate const& b) noexcept;

Return Value

  • The ordering of a relative to b.

  • The ordering of a relative to b.

  • The ordering of a relative to b, comparing elements in order then size.

  • The ordering of the feerates of a and b.

  • The ordering of a relative to b, comparing feerate first and larger size first on ties.

  • Ordering of a relative to b.

Parameters

Name

Description

a

The left‐hand identifier.

b

The right‐hand identifier.

Created with MrDocs