10 #if !defined(CNL_IMPL_NUM_TRAITS_DIGITS_H)
11 #define CNL_IMPL_NUM_TRAITS_DIGITS_H
13 #include "../numbers/signedness.h"
14 #include "../used_digits.h"
15 #include "is_composite.h"
19 #include <type_traits>
34 template<
typename Integer>
35 inline constexpr
auto fundamental_digits = CHAR_BIT *
sizeof(Integer) - numbers::signedness_v<Integer>;
38 template<std::
integral Integer>
39 inline constexpr
int digits_v<Integer> = _impl::fundamental_digits<Integer>;
44 inline constexpr
int fractional_digits = 0;
48 inline constexpr
auto integer_digits = digits_v<T> - fractional_digits<T>;
52 #endif // CNL_IMPL_NUM_TRAITS_DIGITS_H