#include <modm/math/utils/arithmetic_traits.hpp>
|  | 
| static constexpr bool | isInteger | 
|  | 
| static constexpr unsigned char | decimalDigits | 
|  | 
template<typename T>
struct modm::ArithmeticTraits< T >
Arithmetic Traits
Previously, some of the functionalities of <type_traits> and <limits> were implemented here, when they were not yet available in the C++ standard library. Only isInteger and decimalDigits are left, for all others please use the C++ standard library in the future.
Values provided by these traits
- isIntegeris this a integer type
- decimalDigitscount of digits to display this type in decimal
Usage
 
template<typename T > 
  
  | 
        
          | constexpr unsigned char modm::ArithmeticTraits< T >::decimalDigits |  | staticconstexpr | 
 
Initial value:std::ceil(std::numeric_limits<T>::digits * log10(2)) + (std::is_signed_v<T> ? 1 : 0)
 
 
template<typename T > 
  
  | 
        
          | constexpr bool modm::ArithmeticTraits< T >::isInteger |  | staticconstexpr | 
 
Initial value:std::is_integral_v<T>
        && !std::is_same_v<std::decay_t<T>, bool>
 
 
The documentation for this struct was generated from the following file: