Skip to content

Commit 1504792

Browse files
committed
Merge branch 'main' of github.com:fastfloat/fast_float
2 parents 864e790 + 3c5b166 commit 1504792

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed

.github/workflows/s390x.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: uraimo/run-on-arch-action@v2
16+
- uses: uraimo/run-on-arch-action@v3
1717
name: Test
1818
id: runcmd
1919
with:

.github/workflows/ubuntu24.yml

+16-10
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ jobs:
99
- uses: actions/checkout@v4
1010
- name: Use cmake
1111
run: |
12-
mkdir build &&
13-
cd build &&
14-
CXXFLAGS=-Werror cmake -DFASTFLOAT_TEST=ON -D FASTFLOAT_BENCHMARKS=ON .. &&
15-
cmake --build . &&
16-
ctest --output-on-failure
12+
set -xe
13+
cmake -B build \
14+
-DFASTFLOAT_TEST=ON \
15+
-DFASTFLOAT_BENCHMARKS=ON \
16+
-DCMAKE_CXX_FLAGS=' -Werror -Wundef '
17+
cmake --build build --parallel
18+
( cd build ; ctest --output-on-failure )
1719
- name: Use cmake CXX23
1820
run: |
19-
mkdir build20 &&
20-
cd build20 &&
21-
CXXFLAGS=-Werror cmake -DFASTFLOAT_CONSTEXPR_TESTS=ON -DFASTFLOAT_FIXEDWIDTH_TESTS=ON -DFASTFLOAT_CXX_STANDARD=23 -DFASTFLOAT_TEST=ON .. &&
22-
cmake --build . &&
23-
ctest --output-on-failure
21+
set -xe
22+
cmake -B build20 \
23+
-DFASTFLOAT_TEST=ON \
24+
-DFASTFLOAT_CONSTEXPR_TESTS=ON \
25+
-DFASTFLOAT_FIXEDWIDTH_TESTS=ON \
26+
-DFASTFLOAT_CXX_STANDARD=23 \
27+
-DCMAKE_CXX_FLAGS=' -Werror -Wundef '
28+
cmake --build build20 --parallel
29+
( cd build20 ; ctest --output-on-failure )

benchmarks/event_counter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <libgen.h>
1818
#endif
1919

20-
#if __APPLE__ && __aarch64__
20+
#if (defined(__APPLE__) && __APPLE__) && (defined(__aarch64__) && __aarch64__)
2121
#include "apple_arm_events.h"
2222
#endif
2323

include/fast_float/constexpr_feature_detect.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#endif
99

1010
// Testing for https://wg21.link/N3652, adopted in C++14
11-
#if __cpp_constexpr >= 201304
11+
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
1212
#define FASTFLOAT_CONSTEXPR14 constexpr
1313
#else
1414
#define FASTFLOAT_CONSTEXPR14
@@ -29,6 +29,7 @@
2929

3030
// Testing for relevant C++20 constexpr library features
3131
#if FASTFLOAT_HAS_IS_CONSTANT_EVALUATED && FASTFLOAT_HAS_BIT_CAST && \
32+
defined(__cpp_lib_constexpr_algorithms) && \
3233
__cpp_lib_constexpr_algorithms >= 201806L /*For std::copy and std::fill*/
3334
#define FASTFLOAT_CONSTEXPR20 constexpr
3435
#define FASTFLOAT_IS_CONSTEXPR 1

include/fast_float/float_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <type_traits>
1010
#include <system_error>
1111
#ifdef __has_include
12-
#if __has_include(<stdfloat>) && (__cplusplus > 202002L || _MSVC_LANG > 202002L)
12+
#if __has_include(<stdfloat>) && (__cplusplus > 202002L || (defined(_MSVC_LANG) && (_MSVC_LANG > 202002L)))
1313
#include <stdfloat>
1414
#endif
1515
#endif

0 commit comments

Comments
 (0)