GnuCash  5.6-133-gc519490283+
Functions
Constructors

Constructors are templated so that a GncInt128 can be constructed from any arbitrary integer type or pair of integer types. More...

Functions

 GncInt128::GncInt128 ()
 Default constructor. More...
 
template<typename T , std::enable_if_t< std::is_integral< T >::value, bool > = true>
 GncInt128::GncInt128 (T lower)
 
 GncInt128::GncInt128 (uint64_t lower)
 
template<typename T , typename U , std::enable_if_t<(std::is_integral< T >::value &&std::is_integral< U >::value), bool > = true>
 GncInt128::GncInt128 (T upper, U lower, unsigned char flags='\0')
 Double-integer constructor template.
 
 GncInt128::GncInt128 (int64_t upper, int64_t lower, unsigned char flags='\0')
 
template<typename T , std::enable_if_t< std::is_integral< T >::value, bool > = true>
 GncInt128::GncInt128 (T upper, uint64_t lower)
 
 GncInt128::GncInt128 (int64_t upper, uint64_t lower, unsigned char flags='\0')
 
 GncInt128::GncInt128 (uint64_t upper, uint64_t lower, unsigned char flags='\0')
 

Detailed Description

Constructors are templated so that a GncInt128 can be constructed from any arbitrary integer type or pair of integer types.

Note
If the two parameters are of differing sign, it's taken to mean that the lower magnitude is reducing the magnitude of the upper, so the lower magnitude will be subtracted from UINT64_MAX to obtain the lower limb value.

Function Documentation

◆ GncInt128()

GncInt128::GncInt128 ( )

Default constructor.

Makes 0.

Definition at line 64 of file gnc-int128.cpp.

64 : m_hi {0}, m_lo {0}{}