From b063de82c739d2b93a209cc5fa3dceee8881b538 Mon Sep 17 00:00:00 2001 From: Michael Lippautz Date: Thu, 16 Apr 2026 09:51:58 +0200 Subject: [PATCH 1/4] Include in float_common.h `fastfloat_strncasecmp` relies on `std::min`. --- include/fast_float/float_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index bed3efd..f17b5e9 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -1,6 +1,7 @@ #ifndef FASTFLOAT_FLOAT_COMMON_H #define FASTFLOAT_FLOAT_COMMON_H +#include #include #include #include From 001c04cc8aea998bcbf380b35ca0369e0cd23e60 Mon Sep 17 00:00:00 2001 From: Michael Lippautz Date: Thu, 16 Apr 2026 17:17:19 +0000 Subject: [PATCH 2/4] Remove include and replace std::min with ternary operators Replaces uses of std::min with ternary operators in ascii_number.h, digit_comparison.h, and float_common.h to remove the dependency on the header in those files. --- include/fast_float/ascii_number.h | 2 +- include/fast_float/digit_comparison.h | 3 +-- include/fast_float/float_common.h | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 8543537..12c2fdd 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -594,7 +594,7 @@ parse_int_string(UC const *p, UC const *pend, T &value, ((digits + 0x46464646u) | (digits - 0x30303030u)) & 0x80808080u; uint32_t tz = (uint32_t)countr_zero_32(magic); // 7, 15, 23, 31, or 32 uint32_t nd = (tz == 32) ? 4 : (tz >> 3); - nd = (uint32_t)std::min((size_t)nd, len); + nd = (uint32_t)(nd < len ? nd : len); if (nd == 0) { if (has_leading_zeros) { value = 0; diff --git a/include/fast_float/digit_comparison.h b/include/fast_float/digit_comparison.h index 03e70dc..c2c83b0 100644 --- a/include/fast_float/digit_comparison.h +++ b/include/fast_float/digit_comparison.h @@ -1,7 +1,6 @@ #ifndef FASTFLOAT_DIGIT_COMPARISON_H #define FASTFLOAT_DIGIT_COMPARISON_H -#include #include #include #include @@ -109,7 +108,7 @@ fastfloat_really_inline FASTFLOAT_CONSTEXPR14 void round(adjusted_mantissa &am, if (-am.power2 >= mantissa_shift) { // have a denormal float int32_t shift = -am.power2 + 1; - cb(am, std::min(shift, 64)); + cb(am, (shift < 64 ? shift : 64)); // check for round-up: if rounding-nearest carried us to the hidden bit. am.power2 = (am.mantissa < (uint64_t(1) << binary_format::mantissa_explicit_bits())) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index f17b5e9..6990588 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -1,7 +1,6 @@ #ifndef FASTFLOAT_FLOAT_COMMON_H #define FASTFLOAT_FLOAT_COMMON_H -#include #include #include #include @@ -399,7 +398,7 @@ fastfloat_strncasecmp(UC const *actual_mixedcase, UC const *expected_lowercase, size_t sz{8 / (sizeof(UC))}; for (size_t i = 0; i < length; i += sz) { val1 = val2 = 0; - sz = std::min(sz, length - i); + sz = sz < (length - i) ? sz : length - i; ::memcpy(&val1, actual_mixedcase + i, sz * sizeof(UC)); ::memcpy(&val2, expected_lowercase + i, sz * sizeof(UC)); val1 |= mask; From b2b1e203babf30b38b658d612aed63a2ecdbde92 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Thu, 16 Apr 2026 14:38:27 -0400 Subject: [PATCH 3/4] removing msys 32-bit --- .github/workflows/msys2-clang.yml | 3 --- .github/workflows/msys2.yml | 6 ------ 2 files changed, 9 deletions(-) diff --git a/.github/workflows/msys2-clang.yml b/.github/workflows/msys2-clang.yml index 68b36ea..c6f8747 100644 --- a/.github/workflows/msys2-clang.yml +++ b/.github/workflows/msys2-clang.yml @@ -16,9 +16,6 @@ jobs: - msystem: "MINGW64" install: mingw-w64-x86_64-libxml2 mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang type: Release - - msystem: "MINGW32" - install: mingw-w64-i686-libxml2 mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang - type: Release env: CMAKE_GENERATOR: Ninja diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml index ae604c8..6274913 100644 --- a/.github/workflows/msys2.yml +++ b/.github/workflows/msys2.yml @@ -16,15 +16,9 @@ jobs: - msystem: "MINGW64" install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc type: Release - - msystem: "MINGW32" - install: mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-gcc - type: Release - msystem: "MINGW64" install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc type: Debug - - msystem: "MINGW32" - install: mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-gcc - type: Debug env: CMAKE_GENERATOR: Ninja From 05087a303dad9c98768b33c829d398223a649bc6 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Thu, 16 Apr 2026 14:39:03 -0400 Subject: [PATCH 4/4] 8.2.5 --- CMakeLists.txt | 2 +- README.md | 6 +++--- include/fast_float/float_common.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41951d3..e7cedc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.14) -project(fast_float VERSION 8.2.4 LANGUAGES CXX) +project(fast_float VERSION 8.2.5 LANGUAGES CXX) set(FASTFLOAT_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for fastfloat") set(CMAKE_CXX_STANDARD ${FASTFLOAT_CXX_STANDARD}) option(FASTFLOAT_TEST "Enable tests" OFF) diff --git a/README.md b/README.md index 9484ade..be0f1f5 100644 --- a/README.md +++ b/README.md @@ -541,7 +541,7 @@ sufficiently recent version of CMake (3.11 or better at least): FetchContent_Declare( fast_float GIT_REPOSITORY https://github.com/fastfloat/fast_float.git - GIT_TAG tags/v8.2.4 + GIT_TAG tags/v8.2.5 GIT_SHALLOW TRUE) FetchContent_MakeAvailable(fast_float) @@ -557,7 +557,7 @@ You may also use [CPM](https://github.com/cpm-cmake/CPM.cmake), like so: CPMAddPackage( NAME fast_float GITHUB_REPOSITORY "fastfloat/fast_float" - GIT_TAG v8.2.4) + GIT_TAG v8.2.5) ``` ## Using as single header @@ -569,7 +569,7 @@ if desired as described in the command line help. You may directly download automatically generated single-header files: - + ## Benchmarking diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 6990588..403eea1 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -18,7 +18,7 @@ #define FASTFLOAT_VERSION_MAJOR 8 #define FASTFLOAT_VERSION_MINOR 2 -#define FASTFLOAT_VERSION_PATCH 4 +#define FASTFLOAT_VERSION_PATCH 5 #define FASTFLOAT_STRINGIZE_IMPL(x) #x #define FASTFLOAT_STRINGIZE(x) FASTFLOAT_STRINGIZE_IMPL(x)