Iros
 
Loading...
Searching...
No Matches
di::math::FixedUnsigned< bits > Class Template Reference

A fixed-width unsigned integer. More...

#include <di/math/bigint/fixed_unsigned.h>

Public Member Functions

 FixedUnsigned ()=default
 
constexpr FixedUnsigned (bigint::StorageType value)
 
constexpr auto operator/ (FixedUnsigned const &divisor) const -> FixedUnsigned
 
constexpr auto operator% (FixedUnsigned const &divisor) const -> FixedUnsigned
 

Friends

constexpr friend auto operator== (FixedUnsigned const &a, FixedUnsigned const &b) -> bool
 
constexpr friend auto operator<=> (FixedUnsigned const &a, FixedUnsigned const &b)
 

Detailed Description

template<usize bits>
requires (bits % sizeof(bigint::StorageType) == 0)
class di::math::FixedUnsigned< bits >

A fixed-width unsigned integer.

Template Parameters
bitsThe number of bits in the integer.
Note
This can be used fallback implementation for when the compiler doesn't support 128-bit integers. As such, its internal layout must by ABI compatible with the compiler's 128-bit integer type.

Constructor & Destructor Documentation

◆ FixedUnsigned() [1/2]

template<usize bits>
di::math::FixedUnsigned< bits >::FixedUnsigned ( )
default

◆ FixedUnsigned() [2/2]

template<usize bits>
di::math::FixedUnsigned< bits >::FixedUnsigned ( bigint::StorageType value)
inlineconstexpr

Member Function Documentation

◆ operator%()

template<usize bits>
auto di::math::FixedUnsigned< bits >::operator% ( FixedUnsigned< bits > const & divisor) const -> FixedUnsigned
inlineconstexpr

◆ operator/()

template<usize bits>
auto di::math::FixedUnsigned< bits >::operator/ ( FixedUnsigned< bits > const & divisor) const -> FixedUnsigned
inlineconstexpr

Friends And Related Symbol Documentation

◆ operator<=>

template<usize bits>
friend auto operator<=> ( FixedUnsigned< bits > const & a,
FixedUnsigned< bits > const & b )
friend

◆ operator==

template<usize bits>
friend auto operator== ( FixedUnsigned< bits > const & a,
FixedUnsigned< bits > const & b ) -> bool
friend

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