diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 9b5befe..a70db6e 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -28,11 +28,20 @@ template fastfloat_really_inline constexpr bool has_simd_opt() { #endif } +template struct get_equal_sized_uint { + using type = std::conditional_t< + sizeof(value_type) == 4, uint32_t, + std::conditional_t>; +}; + +template +using get_equal_sized_uint_t = typename get_equal_sized_uint::type; + // Next function can be micro-optimized, but compilers are entirely // able to optimize it well. template fastfloat_really_inline constexpr bool is_integer(UC c) noexcept { - return static_cast(c - UC('0')) < 10; + return static_cast>(c - UC('0')) < 10; } fastfloat_really_inline constexpr uint64_t byteswap(uint64_t val) {