diff --git a/.github/workflows/ubuntu22-gcc13.yml b/.github/workflows/ubuntu22-gcc13.yml index 7757f8a..d6aea23 100644 --- a/.github/workflows/ubuntu22-gcc13.yml +++ b/.github/workflows/ubuntu22-gcc13.yml @@ -14,10 +14,10 @@ jobs: CXX=g++-13 CXXFLAGS=-Werror cmake -DFASTFLOAT_TEST=ON .. && cmake --build . && ctest --output-on-failure - - name: Use cmake CXX20 + - name: Use cmake CXX23 run: | mkdir build20 && cd build20 && - CXX=g++-13 CXXFLAGS=-Werror cmake -DFASTFLOAT_CONSTEXPR_TESTS=ON -DFASTFLOAT_CXX_STANDARD=20 -DFASTFLOAT_TEST=ON .. && + CXX=g++-13 CXXFLAGS=-Werror cmake -DFASTFLOAT_CONSTEXPR_TESTS=ON -DFASTFLOAT_CXX_STANDARD=23 -DFASTFLOAT_TEST=ON .. && cmake --build . && ctest --output-on-failure \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index da1f631..8847f06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ target_include_directories( $ $ ) -target_compile_features(fast_float INTERFACE cxx_std_23) +target_compile_features(fast_float INTERFACE cxx_std_11) if(FASTFLOAT_SANITIZE) target_compile_options(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all) target_link_libraries(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all) diff --git a/include/fast_float/constexpr_feature_detect.h b/include/fast_float/constexpr_feature_detect.h index ba8b65c..f6bd08d 100644 --- a/include/fast_float/constexpr_feature_detect.h +++ b/include/fast_float/constexpr_feature_detect.h @@ -8,7 +8,7 @@ #endif // Testing for https://wg21.link/N3652, adopted in C++14 -#if __cpp_constexpr >= 201304 +#if __cpp_constexpr >= 201304` #define FASTFLOAT_CONSTEXPR14 constexpr #else #define FASTFLOAT_CONSTEXPR14 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a9accc7..0739a00 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -62,10 +62,10 @@ fast_float_add_cpp_test(example_comma_test) fast_float_add_cpp_test(basictest) option(FASTFLOAT_CONSTEXPR_TESTS "Require constexpr tests (build will fail if the compiler won't support it)" OFF) if (FASTFLOAT_CONSTEXPR_TESTS) - target_compile_features(basictest PRIVATE cxx_std_23) + target_compile_features(basictest PRIVATE cxx_std_20) target_compile_definitions(basictest PRIVATE FASTFLOAT_CONSTEXPR_TESTS) else() - target_compile_features(basictest PRIVATE cxx_std_23) + target_compile_features(basictest PRIVATE cxx_std_17) endif() fast_float_add_cpp_test(long_test)