fixed_point (deprecated)
rev.2
Binary Fixed-Point Arithmetic Library in C++
|
literal integer type that encodes its width in bits within its type More...
#include <sg14/auxiliary/elastic_integer.h>
Inherits base_class_t< Digits, Narrowest >.
Public Types | |
using | narrowest = Narrowest |
alias to template parameter, Narrowest | |
using | rep = typename _base::rep |
the actual type used to store the value; closely related to Narrowest but may be a different width | |
Public Member Functions | |
constexpr | elastic_integer ()=default |
default constructor | |
constexpr | elastic_integer (const elastic_integer &rhs) |
common copy constructor | |
template<class Number , _impl::enable_if_t< std::numeric_limits< Number >::is_specialized, int > Dummy = 0> | |
constexpr | elastic_integer (Number n) |
construct from numeric type | |
template<int FromWidth, class FromNarrowest > | |
constexpr | elastic_integer (const elastic_integer< FromWidth, FromNarrowest > &rhs) |
constructor taking an elastic_integer type | |
template<class Integral , Integral Value, int Exponent> | |
constexpr | elastic_integer (const_integer< Integral, Value, Digits, Exponent >) |
constructor taking an integral constant | |
template<class S > | |
constexpr | operator S () const |
returns value | |
template<class S , _impl::enable_if_t< std::is_floating_point< S >::value, int > Dummy = 0> | |
elastic_integer & | operator= (S s) |
copy assignment operator taking a floating-point type | |
Static Public Attributes | |
static constexpr int | digits = Digits |
alias to template parameter, Digits | |
literal integer type that encodes its width in bits within its type
Digits | a count of the number of digits needed to express the number |
Narrowest | the most narrow integer type to use for storage |