Improvements detection of features, part 6. Visual Studio 17 and 18 officially support C++14 as a baseline standard, not try to use C++11 on them.

This commit is contained in:
HedgehogInTheCPP 2026-08-21 20:47:33 +03:00
parent 60734e063e
commit d42564c373
8 changed files with 18 additions and 19 deletions

View File

@ -10,14 +10,14 @@ jobs:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 18 2026, arch: ARM64, cfg: Release}
- {gen: Visual Studio 18 2026, arch: ARM64, cfg: Debug}
- {gen: Visual Studio 17 2026, arch: ARM64, cfg: Release}
- {gen: Visual Studio 17 2026, arch: ARM64, cfg: Debug}
steps:
- name: checkout
uses: actions/checkout@v7
- name: configure
run: |
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DCMAKE_CROSSCOMPILING=1 -DFASTFLOAT_TEST=ON
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DCMAKE_CROSSCOMPILING=1 -DFASTFLOAT_CXX_STANDARD=14 -DFASTFLOAT_TEST=ON
- name: build
run: |
cmake --build build --verbose --config ${{matrix.cfg}} --parallel

View File

@ -10,16 +10,16 @@ jobs:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 18 2026, arch: Win32, cfg: Release}
#- {gen: Visual Studio 18 2026, arch: Win32, cfg: Debug}
- {gen: Visual Studio 18 2026, arch: x64, cfg: Release}
- {gen: Visual Studio 18 2026, arch: x64, cfg: Debug}
- {gen: Visual Studio 17 2026, arch: Win32, cfg: Release}
- {gen: Visual Studio 17 2026, arch: Win32, cfg: Debug}
- {gen: Visual Studio 17 2026, arch: x64, cfg: Release}
- {gen: Visual Studio 17 2026, arch: x64, cfg: Debug}
steps:
- name: checkout
uses: actions/checkout@v7
- name: configure
run: |
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_BENCHMARKS=ON -DFASTFLOAT_TEST=ON -DCMAKE_INSTALL_PREFIX:PATH=destination
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_CXX_STANDARD=14 -DFASTFLOAT_BENCHMARKS=OFF -DFASTFLOAT_TEST=ON -DCMAKE_INSTALL_PREFIX:PATH=destination
- name: build
run: |
cmake --build build --verbose --config ${{matrix.cfg}} --parallel

View File

@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v7
- name: Configure
run: |
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_BENCHMARKS=ON -T ClangCL -DFASTFLOAT_TEST=ON
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_BENCHMARKS=OFF -T ClangCL -DFASTFLOAT_TEST=ON
- name: Build
run: cmake --build build --config ${{matrix.cfg}} --parallel --verbose
- name: Run basic tests

View File

@ -10,10 +10,10 @@ jobs:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 18 2026, arch: Win32, cfg: Release}
- {gen: Visual Studio 18 2026, arch: Win32, cfg: Debug}
- {gen: Visual Studio 18 2026, arch: x64, cfg: Release}
- {gen: Visual Studio 18 2026, arch: x64, cfg: Debug}
- {gen: Visual Studio 17 2026, arch: Win32, cfg: Release}
- {gen: Visual Studio 17 2026, arch: Win32, cfg: Debug}
- {gen: Visual Studio 17 2026, arch: x64, cfg: Release}
- {gen: Visual Studio 17 2026, arch: x64, cfg: Debug}
steps:
- name: checkout
uses: actions/checkout@v7

View File

@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v7
- name: configure
run: |
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DCMAKE_CROSSCOMPILING=1 -DFASTFLOAT_TEST=ON
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DCMAKE_CROSSCOMPILING=1 -DFASTFLOAT_CXX_STANDARD=14 -DFASTFLOAT_TEST=ON
- name: build
run: |
cmake --build build --verbose --config ${{matrix.cfg}} --parallel

View File

@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v7
- name: configure
run: |
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_BENCHMARKS=ON -DFASTFLOAT_TEST=ON -DCMAKE_INSTALL_PREFIX:PATH=destination
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_CXX_STANDARD=14 -DFASTFLOAT_BENCHMARKS=OFF -DFASTFLOAT_TEST=ON -DCMAKE_INSTALL_PREFIX:PATH=destination
- name: build
run: |
cmake --build build --verbose --config ${{matrix.cfg}} --parallel

View File

@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v7
- name: Configure
run: |
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_BENCHMARKS=ON -T ClangCL -DFASTFLOAT_TEST=ON
cmake -S . -B build -G "${{matrix.gen}}" -A ${{matrix.arch}} -DFASTFLOAT_BENCHMARKS=OFF -T ClangCL -DFASTFLOAT_TEST=ON
- name: Build
run: cmake --build build --config ${{matrix.cfg}} --parallel --verbose
- name: Run basic tests

View File

@ -70,13 +70,12 @@
#endif
// C++20 std::is_constant_evaluated
#if defined(__cpp_lib_is_constant_evaluated) && \
__cpp_lib_is_constant_evaluated >= 201811L
#if defined(__cpp_lib_is_constant_evaluated) && __cpp_lib_is_constant_evaluated >= 201811L && defined(__cpp_consteval) && __cpp_consteval >= 201811L
#define FASTFLOAT_HAS_IS_CONSTANT_EVALUATED 1
#define FASTFLOAT_CONSTEVAL consteval
#else
#define FASTFLOAT_HAS_IS_CONSTANT_EVALUATED 0
#define FASTFLOAT_CONSTEVAL FASTFLOAT_CONSTEXPR14
#define FASTFLOAT_CONSTEVAL
#endif
// C++20 constexpr library support, including std::is_constant_evaluated(),