GnuCash  4.11-517-g41de4cefce
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 >
 GncInt128::GncInt128 (T lower)
 
 GncInt128::GncInt128 (uint64_t lower)
 
template<typename T , typename U >
 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 >
 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 67 of file gnc-int128.cpp.

67 : m_hi {0}, m_lo {0}{}