carl  24.02
Computer ARithmetic Library
Type Traits

We define custom type traits for number types we use. More...

Collaboration diagram for Type Traits:

Modules

 is_field_type
 All types that represent a field are marked with is_field_type.
 
 is_finite_type
 All types that can represent only numbers from a finite domain are marked with is_finite_type.
 
 is_float_type
 All types that represent floating point numbers are marked with is_float_type.
 
 is_integer_type
 All integral types that can (in theory) represent all integers are marked with is_integer_type.
 
 is_number_type
 All types that represent any kind of number are marked with is_number_type.
 
 is_rational_type
 All integral types that can (in theory) represent all rationals are marked with is_rational_type.
 
 IntegralType
 The associated integral type of any type can be defined with IntegralType.
 
 UnderlyingNumberType
 The number type that some type is built upon can be defined with UnderlyingNumberType.
 

Files

file  typetraits.h
 
file  typetraits.h
 
file  typetraits.h
 
file  typetraits.h
 

Detailed Description

We define custom type traits for number types we use.

We use the notation conventions of the STL, being lower cases with underscores.

We define the following type traits:

A more exact definition for each of these type traits can be found in their own documentation.

Additionally, we define related types in a type traits like manner:

Note that we keep away from similar type traits defined in the standard [4] (20.9) (like std::is_integral or std::is_floating_point, as they are not meant to be specialized for custom types.