mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 08:46:49 +08:00
Merge branch 'main' into P2497R0
This commit is contained in:
commit
42db9ac1de
2
.github/workflows/amalgamate-ubuntu24.yml
vendored
2
.github/workflows/amalgamate-ubuntu24.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Amalgamate Ubuntu 20.04 CI (GCC 13æ)
|
name: Amalgamate Ubuntu 24.04 CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
|||||||
17
.github/workflows/emscripten.yml
vendored
Normal file
17
.github/workflows/emscripten.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
- uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
|
||||||
|
- name: Verify
|
||||||
|
run: emcc -v
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3.6.0
|
||||||
|
- name: Configure
|
||||||
|
run: emcmake cmake -B build
|
||||||
|
- name: Build # We build but do not test
|
||||||
|
run: cmake --build build
|
||||||
19
.github/workflows/ubuntu24-cxx20.yml
vendored
Normal file
19
.github/workflows/ubuntu24-cxx20.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: Ubuntu 24.04 CI
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ubuntu-build:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Use cmake
|
||||||
|
run: |
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -DFASTFLOAT_CXX_STANDARD=20 -DFASTFLOAT_TEST=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
|
||||||
|
cmake --build . &&
|
||||||
|
ctest --output-on-failure &&
|
||||||
|
cmake --install .
|
||||||
@ -1,5 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
|
||||||
|
|
||||||
project(fast_float VERSION 8.0.2 LANGUAGES CXX)
|
project(fast_float VERSION 8.0.2 LANGUAGES CXX)
|
||||||
set(FASTFLOAT_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for fastfloat")
|
set(FASTFLOAT_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for fastfloat")
|
||||||
set(CMAKE_CXX_STANDARD ${FASTFLOAT_CXX_STANDARD})
|
set(CMAKE_CXX_STANDARD ${FASTFLOAT_CXX_STANDARD})
|
||||||
|
|||||||
@ -554,6 +554,7 @@ cmake --build build
|
|||||||
manager](https://conan.io/center/recipes/fast_float).
|
manager](https://conan.io/center/recipes/fast_float).
|
||||||
* It is part of the [brew package
|
* It is part of the [brew package
|
||||||
manager](https://formulae.brew.sh/formula/fast_float).
|
manager](https://formulae.brew.sh/formula/fast_float).
|
||||||
|
* fast_float is available on [xmake](https://xmake.io) repository.
|
||||||
* Some Linux distribution like Fedora include fast_float (e.g., as
|
* Some Linux distribution like Fedora include fast_float (e.g., as
|
||||||
`fast_float-devel`).
|
`fast_float-devel`).
|
||||||
|
|
||||||
|
|||||||
@ -441,7 +441,7 @@ parse_number_string(UC const *p, UC const *pend,
|
|||||||
if (digit_count > 19) {
|
if (digit_count > 19) {
|
||||||
answer.too_many_digits = true;
|
answer.too_many_digits = true;
|
||||||
// Let us start again, this time, avoiding overflows.
|
// Let us start again, this time, avoiding overflows.
|
||||||
// We don't need to check if is_integer, since we use the
|
// We don't need to call if is_integer, since we use the
|
||||||
// pre-tokenized spans from above.
|
// pre-tokenized spans from above.
|
||||||
i = 0;
|
i = 0;
|
||||||
p = answer.integer.ptr;
|
p = answer.integer.ptr;
|
||||||
@ -451,7 +451,7 @@ parse_number_string(UC const *p, UC const *pend,
|
|||||||
i = i * 10 + uint64_t(*p - UC('0'));
|
i = i * 10 + uint64_t(*p - UC('0'));
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
if (i >= minimal_nineteen_digit_integer) { // We have a big integers
|
if (i >= minimal_nineteen_digit_integer) { // We have a big integer
|
||||||
exponent = end_of_integer_part - p + exp_number;
|
exponent = end_of_integer_part - p + exp_number;
|
||||||
} else { // We have a value with a fractional component.
|
} else { // We have a value with a fractional component.
|
||||||
p = answer.fraction.ptr;
|
p = answer.fraction.ptr;
|
||||||
|
|||||||
@ -9,8 +9,7 @@ option(FASTFLOAT_SUPPLEMENTAL_TESTS "Run supplemental tests" ON)
|
|||||||
|
|
||||||
if (NOT SYSTEM_DOCTEST)
|
if (NOT SYSTEM_DOCTEST)
|
||||||
FetchContent_Declare(doctest
|
FetchContent_Declare(doctest
|
||||||
GIT_REPOSITORY https://github.com/onqtam/doctest.git
|
GIT_REPOSITORY https://github.com/lemire/doctest.git)
|
||||||
GIT_TAG v2.4.12)
|
|
||||||
else ()
|
else ()
|
||||||
find_package(doctest REQUIRED)
|
find_package(doctest REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user