|
| using | Fundamental = Conditional< IsSatisfied<(S)>, Conditional< IsSatisfied<(W==8)>, std::int8_t, Conditional< IsSatisfied<(W==16)>, std::int16_t, Conditional< IsSatisfied<(W==32)>, std::int32_t, Conditional< IsSatisfied<(W==64)>, std::int64_t, Undefined > > > >, Conditional< IsSatisfied<(W==8)>, std::uint8_t, Conditional< IsSatisfied<(W==16)>, std::uint16_t, Conditional< IsSatisfied<(W==32)>, std::uint32_t, Conditional< IsSatisfied<(W==64)>, std::uint64_t, Undefined > > > > > |
| |
| using | Value = Integer< S, W > |
| |
| template<class V , If< IsValue< V > > = 0> |
| using | ChangeValue = V |
| |
| using | Signed = pRC::Constant< Bool, S > |
| |
| template<Bool R> |
| using | ChangeSigned = Integer< R, W > |
| |
| using | Width = pRC::Constant< Size, W > |
| |
| template<Size Q> |
| using | ChangeWidth = Integer< S, Q > |
| |
| using | IsComplexified = False<> |
| |
| using | Complexify = Complex< Integer< S, W > > |
| |
| using | NonComplex = Integer< S, W > |
| |
|
| | ~Integer ()=default |
| |
| constexpr | Integer (Integer const &)=default |
| |
| constexpr | Integer (Integer &&)=default |
| |
| constexpr Integer & | operator= (Integer const &) &=default |
| |
| constexpr Integer & | operator= (Integer &&) &=default |
| |
| constexpr | Integer ()=default |
| |
| template<class U , If< IsConstructible< Fundamental, U > > = 0> |
| constexpr | Integer (U const basic) |
| | Integer initializer from standard data types (like int, unsigned)
|
| |
| template<class U , If< IsValue< U > > = 0> |
| constexpr | Integer (U const &value) |
| | Integer initializer from pRC value data type (like Float, Integer)
|
| |
| template<class U , If< IsValue< U > > = 0> |
| constexpr | Integer (Complex< U > const &value) |
| | Integer initializer from pRC::Complex object.
|
| |
| constexpr | Integer (Zero<> const) |
| | Integer initializer from pRC::Zero.
|
| |
| constexpr | Integer (Unit<> const) |
| | Integer initializer from pRC::Unit.
|
| |
| constexpr | Integer (Identity<> const) |
| | Integer initializer from pRC::Identity.
|
| |
| template<class U , If< IsAssignable< Fundamental, U > > = 0> |
| constexpr auto & | operator= (U const basic) & |
| | Integer assignment from standard data types (like int, unsigned)
|
| |
| template<class U , If< IsValue< U > > = 0> |
| constexpr auto & | operator= (U const &value) & |
| | Integer asignment from pRC value data type (like Float, Integer)
|
| |
| template<class U , If< IsValue< U > > = 0> |
| constexpr auto & | operator= (Complex< U > const &value) & |
| | Integer assignment from Complex object.
|
| |
| constexpr auto & | operator= (Zero<> const) & |
| | Integer assignment from pRC::Zero.
|
| |
| constexpr auto & | operator= (Unit<> const) & |
| | Integer assignment from pRC::Unit.
|
| |
| constexpr auto & | operator= (Identity<> const) & |
| | Integer assignment from pRC::Identity.
|
| |
| constexpr decltype(auto) | operator() () && |
| |
| constexpr decltype(auto) | operator() () const && |
| |
| constexpr auto & | operator() () & |
| |
| constexpr auto & | operator() () const & |
| |
| constexpr | operator Fundamental () const |
| |
| template<class X , If< IsInvocable< Add, Integer &, X > > = 0> |
| constexpr auto & | operator+= (X &&rhs) & |
| | += operator for Integer
|
| |
| template<class X , If< IsInvocable< Sub, Integer &, X > > = 0> |
| constexpr auto & | operator-= (X &&rhs) & |
| | -= operator for Integer
|
| |
| template<class X , If< IsInvocable< Mul, Integer &, X > > = 0> |
| constexpr auto & | operator*= (X &&rhs) & |
| | *= operator for Integer
|
| |
| template<class X , If< IsInvocable< Div, Integer &, X > > = 0> |
| constexpr auto & | operator/= (X &&rhs) & |
| | /= operator for Integer
|
| |
| template<class X , If< IsInvocable< Mod, Integer &, X > > = 0> |
| constexpr auto & | operator%= (X &&rhs) & |
| | %= operator for Integer
|
| |
template<
Bool S,
Size W>
class pRC::Integer< S, W >
Top-level class storing a floating point number.
Signed and unsigned integers are supported for widths 8, 16, 32 and 64. They are internally stored as standard data types according to the following table:
| Width | Signed | Internal data type |
| 8 | true | std::int8_t |
| false | std::uint8_t |
| 16 | true | std::int16_t |
| false | std::uint16_t |
| 32 | true | std::int32_t |
| false | std::uint32_t |
| 64 | true | std::in64_t |
| false | std::uint64_t |
See also Top-level Value types in pRC for an overview of pRCs builtin types.
- Template Parameters
-
| S | true for signed, false for unsigned Integer |
| W | Width of the Integer (8, 16, 32 or 64) |