sparrow 0.6.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<decimal_integer_type T>
class sparrow::decimal< T >

Definition at line 21 of file decimal.hpp.

Member Typedef Documentation

◆ integer_type

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

Definition at line 25 of file decimal.hpp.

Constructor & Destructor Documentation

◆ decimal() [1/3]

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

Definition at line 68 of file decimal.hpp.

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

◆ decimal() [2/3]

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

◆ decimal() [3/3]

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

Definition at line 84 of file decimal.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ operator double()

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

Definition at line 110 of file decimal.hpp.

Here is the call graph for this function:

◆ operator float()

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

Definition at line 103 of file decimal.hpp.

Here is the call graph for this function:

◆ operator long double()

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

Definition at line 117 of file decimal.hpp.

Here is the call graph for this function:

◆ operator std::string()

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

Definition at line 124 of file decimal.hpp.

Here is the call graph for this function:

◆ operator!=()

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

Definition at line 97 of file decimal.hpp.

Here is the call graph for this function:

◆ operator==()

template<decimal_integer_type 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:

◆ scale()

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

Definition at line 177 of file decimal.hpp.

Here is the caller graph for this function:

◆ storage()

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

Definition at line 171 of file decimal.hpp.


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