projects/guix·blob java-team · refs

48 lines · 2.1 KiB

1From 144a590f6c7861101579069e89dfb1db0ddfec25 Mon Sep 17 00:00:00 2001
2From: Elias Kosunen <[email protected]>
3Date: Wed, 21 May 2025 23:59:59 +0300
4Subject: [PATCH] Fix incompatibility with newer fast_float
5
6---
7 benchmark/runtime/float/repeated.cpp | 1 -
8 benchmark/runtime/float/single.cpp | 1 -
9 src/scn/impl.cpp | 6 ++++--
10 3 files changed, 4 insertions(+), 4 deletions(-)
11
12diff --git a/benchmark/runtime/float/repeated.cpp b/benchmark/runtime/float/repeated.cpp
13index 0aa0c39a..8a4de0a1 100644
14--- a/benchmark/runtime/float/repeated.cpp
15+++ b/benchmark/runtime/float/repeated.cpp
16@@ -210,4 +210,3 @@ static void scan_float_repeated_fastfloat(benchmark::State& state)
17 }
18 BENCHMARK_TEMPLATE(scan_float_repeated_fastfloat, float);
19 BENCHMARK_TEMPLATE(scan_float_repeated_fastfloat, double);
20-BENCHMARK_TEMPLATE(scan_float_repeated_fastfloat, long double);
21diff --git a/benchmark/runtime/float/single.cpp b/benchmark/runtime/float/single.cpp
22index e06cd138..6819621b 100644
23--- a/benchmark/runtime/float/single.cpp
24+++ b/benchmark/runtime/float/single.cpp
25@@ -185,4 +185,3 @@ static void scan_float_single_fastfloat(benchmark::State& state)
26 }
27 BENCHMARK_TEMPLATE(scan_float_single_fastfloat, float);
28 BENCHMARK_TEMPLATE(scan_float_single_fastfloat, double);
29-BENCHMARK_TEMPLATE(scan_float_single_fastfloat, long double);
30diff --git a/src/scn/impl.cpp b/src/scn/impl.cpp
31index a36117d8..1e38f1f4 100644
32--- a/src/scn/impl.cpp
33+++ b/src/scn/impl.cpp
34@@ -723,10 +723,12 @@ struct fast_float_impl_base : impl_base {
35 {
36 unsigned format_flags{};
37 if ((m_options & float_reader_base::allow_fixed) != 0) {
38- format_flags |= fast_float::fixed;
39+ format_flags |=
40+ static_cast<unsigned>(fast_float::chars_format::fixed);
41 }
42 if ((m_options & float_reader_base::allow_scientific) != 0) {
43- format_flags |= fast_float::scientific;
44+ format_flags |=
45+ static_cast<unsigned>(fast_float::chars_format::scientific);
46 }
47
48 return static_cast<fast_float::chars_format>(format_flags);