Bitcoin Core 31.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | Friends | List of all members
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 Tm_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 218 of file feefrac.h.

Constructor & Destructor Documentation

◆ ByRatio()

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

Definition at line 223 of file feefrac.h.

Friends And Related Function Documentation

◆ operator<

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

Definition at line 244 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 256 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 235 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 225 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 250 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 262 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 220 of file feefrac.h.


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