Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
ByRatio< T > Class Template Reference

Wrapper around FeeFrac & derived types, which adds a feerate-based ordering which treats equal-feerate but distinct-size FeeFracs as equals. More...

#include <feefrac.h>

Collaboration diagram for ByRatio< T >:
[legend]

Public Member Functions

constexpr ByRatio (const T &feefrac) noexcept

Private Attributes

const T & m_feefrac

Friends

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

Detailed Description

template<std::derived_from< FeeFrac > T>
class ByRatio< T >

Wrapper around FeeFrac & derived types, which adds a feerate-based ordering which treats equal-feerate but distinct-size FeeFracs as equals.

This is not included inside FeeFrac itself, because it is not a total ordering (as would be expected for built-in comparison operators).

Definition at line 217 of file feefrac.h.

Constructor & Destructor Documentation

◆ ByRatio()

template<std::derived_from< FeeFrac > T>
ByRatio< T >::ByRatio ( const T & feefrac)
inlineconstexprnoexcept

Definition at line 222 of file feefrac.h.

Here is the caller graph for this function:

◆ operator<

template<std::derived_from< FeeFrac > T>
bool operator< ( const ByRatio< T > & a,
const ByRatio< T > & b )
friend

Definition at line 243 of file feefrac.h.

◆ operator<=

template<std::derived_from< FeeFrac > T>
bool operator<= ( const ByRatio< T > & a,
const ByRatio< T > & b )
friend

Definition at line 255 of file feefrac.h.

◆ operator<=>

template<std::derived_from< FeeFrac > T>
std::strong_ordering operator<=> ( const ByRatio< T > & a,
const ByRatio< T > & b )
friend

Definition at line 234 of file feefrac.h.

◆ operator==

template<std::derived_from< FeeFrac > T>
bool operator== ( const ByRatio< T > & a,
const ByRatio< T > & b )
friend

Definition at line 224 of file feefrac.h.

◆ operator>

template<std::derived_from< FeeFrac > T>
bool operator> ( const ByRatio< T > & a,
const ByRatio< T > & b )
friend

Definition at line 249 of file feefrac.h.

◆ operator>=

template<std::derived_from< FeeFrac > T>
bool operator>= ( const ByRatio< T > & a,
const ByRatio< T > & b )
friend

Definition at line 261 of file feefrac.h.

Member Data Documentation

◆ m_feefrac

template<std::derived_from< FeeFrac > T>
const T& ByRatio< T >::m_feefrac
private

Definition at line 219 of file feefrac.h.


The documentation for this class was generated from the following file: