sparrow 0.3.0
Loading...
Searching...
No Matches
sparrow::decimal< T > Class Template Reference

#include <decimal.hpp>

Public Types

using integer_type = T
 

Public Member Functions

 decimal ()
 
 decimal ()
 
 decimal (T value, int scale)
 
bool operator== (const decimal &other) const
 
bool operator!= (const decimal &other) const
 
 operator float () const
 
 operator double () const
 
 operator long double () const
 
 operator std::string () const
 
const T & storage () const
 
int scale () const
 

Detailed Description

template<class T>
class sparrow::decimal< T >

Definition at line 18 of file decimal.hpp.

Member Typedef Documentation

◆ integer_type

template<class T>
using sparrow::decimal< T >::integer_type = T

Definition at line 22 of file decimal.hpp.

Constructor & Destructor Documentation

◆ decimal() [1/3]

template<typename T>
requires (!is_int_placeholder_v<T>)
sparrow::decimal< T >::decimal ( )

Definition at line 62 of file decimal.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decimal() [2/3]

template<class T>
sparrow::decimal< T >::decimal ( )

◆ decimal() [3/3]

template<typename T>
sparrow::decimal< T >::decimal ( T value,
int scale )

Definition at line 78 of file decimal.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ operator double()

template<typename T>
requires (!is_int_placeholder_v<T>)
sparrow::decimal< T >::operator double ( ) const
explicit

Definition at line 104 of file decimal.hpp.

Here is the call graph for this function:

◆ operator float()

template<typename T>
requires (!is_int_placeholder_v<T>)
sparrow::decimal< T >::operator float ( ) const
explicit

Definition at line 97 of file decimal.hpp.

Here is the call graph for this function:

◆ operator long double()

template<typename T>
requires (!is_int_placeholder_v<T>)
sparrow::decimal< T >::operator long double ( ) const
explicit

Definition at line 111 of file decimal.hpp.

Here is the call graph for this function:

◆ operator std::string()

template<typename T>
requires (!is_int_placeholder_v<T>)
sparrow::decimal< T >::operator std::string ( ) const
explicitnodiscard

Definition at line 118 of file decimal.hpp.

Here is the call graph for this function:

◆ operator!=()

template<typename T>
bool sparrow::decimal< T >::operator!= ( const decimal< T > & other) const

Definition at line 91 of file decimal.hpp.

Here is the call graph for this function:

◆ operator==()

template<typename T>
bool sparrow::decimal< T >::operator== ( const decimal< T > & other) const

Definition at line 85 of file decimal.hpp.

Here is the call graph for this function:

◆ scale()

template<typename T>
int sparrow::decimal< T >::scale ( ) const
nodiscard

Definition at line 171 of file decimal.hpp.

Here is the caller graph for this function:

◆ storage()

template<typename T>
const T & sparrow::decimal< T >::storage ( ) const
nodiscard

Definition at line 165 of file decimal.hpp.


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