libfxd 0.2.dev
A fixed-point library for C++.
Loading...
Searching...
No Matches
compare.hpp File Reference
#include <compare>
#include <utility>
#include "detail/shift.hpp"

Go to the source code of this file.

Namespaces

namespace  fxd
 This is the namespace where the entire library is defined.
 

Functions

template<fixed_point Fxd>
constexpr bool operator== (Fxd a, Fxd b) noexcept
 Equality check for two similar fxd::fixed.
 
template<fixed_point A, fixed_point B>
constexpr bool operator== (A a, B b) noexcept
 Equality check for dissimilar fxd::fixed.
 
template<fixed_point Fxd, std::integral I>
constexpr bool operator== (Fxd a, I b) noexcept
 fxd::fixed == integer.
 
template<fixed_point Fxd, std::floating_point Flt>
requires (requires (Fxd fxd) {to_float(fxd);})
constexpr bool operator== (Fxd a, Flt b) noexcept
 fxd::fixed == floating-point
 
template<fixed_point Fxd>
constexpr std::strong_ordering operator<=> (Fxd a, Fxd b) noexcept
 
template<fixed_point A, fixed_point B>
constexpr std::strong_ordering operator<=> (A a, B b) noexcept
 
template<fixed_point Fxd, std::integral I>
constexpr std::strong_ordering operator<=> (Fxd a, I b) noexcept
 
template<fixed_point Fxd, std::floating_point Flt>
requires (requires (Fxd a) {to_float(a);})
constexpr std::partial_ordering operator<=> (Fxd a, Flt b) noexcept