From f73816a959c7d52cdd71c859ecb7e8f86c22682f Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 17:40:55 -0400 Subject: [PATCH 01/46] test --- .github/workflows/ubuntu.yml | 60 ++++++++++-------------------------- 1 file changed, 16 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index f60a11f9b..0c191865f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -137,48 +137,20 @@ jobs: - working-directory: build/ run: ctest -C ubuntu-latest --output-on-failure -# clang_build_cxx20: -# runs-on: ubuntu-latest -# -# steps: -# - uses: actions/checkout@v4 -# - name: install_gcc -# run: | -# sudo apt update -# sudo apt install clang-14 -# shell: bash -# - name: cmake -# run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON -# env: -# CC: clang-14 -# CXX: clang++-14 -# -# - working-directory: build/ -# run: cmake --build . --config ubuntu-latest -# -# - working-directory: build/ -# run: ctest -C ubuntu-latest --output-on-failure - -# gcc_build_48: -# name: GCC 4.8 -# runs-on: ubuntu-18.04 -# -# steps: -# - uses: actions/checkout@v4 -# with: -# fetch-depth: 0 -# - name: Install -# run: | -# sudo apt-get update -y -qq && sudo apt-get install -y -qq g++-4.8 binutils -# shell: bash -# - name: cmake -# run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On -# env: -# CC: gcc-4.8 -# CXX: g++-4.8 -# - name: build -# run: cmake --build build --parallel 10 -# - name: test -# run: cd build ; ctest -j 10 --output-on-failure - + ci_test_compilers_gcc: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: ['4', '5', '6', '7', '8', '9', '10', '11', '12', 'latest'] + container: gcc:${{ matrix.compiler }} + steps: + - uses: actions/checkout@v3 + - name: Get latest CMake and ninja + uses: lukka/get-cmake@v3.27.7 + - name: cmake + run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + - working-directory: build/ + run: cmake --build . --config ubuntu-latest + - working-directory: build/ + run: ctest -C ubuntu-latest --output-on-failure From d166ec92744266b2307f9e7b2085b11a41162d4e Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 18:55:55 -0400 Subject: [PATCH 02/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 0c191865f..e8b3d351e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['4', '5', '6', '7', '8', '9', '10', '11', '12', 'latest'] + compiler: ['5', '6', '7', '8', '9', '10', '11', '12', 'latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From 1da344774d73ff597f384f3e2952ce9f592ab873 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 19:22:07 -0400 Subject: [PATCH 03/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e8b3d351e..513abe153 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['5', '6', '7', '8', '9', '10', '11', '12', 'latest'] + compiler: ['8', '9', '10', '11', '12', 'latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From d6d5fc8165b63ee4f2160fd348e2f31b47e1d154 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 19:58:58 -0400 Subject: [PATCH 04/46] test --- .github/workflows/ubuntu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 513abe153..a46caa9c7 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,14 +141,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['8', '9', '10', '11', '12', 'latest'] + compiler: ['9', '10', '11', '12', 'latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 - name: Get latest CMake and ninja uses: lukka/get-cmake@v3.27.7 - name: cmake - run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - working-directory: build/ run: cmake --build . --config ubuntu-latest - working-directory: build/ From f3c37634de8fae09544a1a3705a4074bbf21dec6 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 20:11:21 -0400 Subject: [PATCH 05/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a46caa9c7..e715125a6 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['9', '10', '11', '12', 'latest'] + compiler: ['latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From 26e431fdd68a61fc6696e5aa9cd6587220ebbb81 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 20:53:34 -0400 Subject: [PATCH 06/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e715125a6..f7041746b 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['latest'] + compiler: ['12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From 86c67fc93c8755ac74fb1851165f5a613e994558 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 21:41:15 -0400 Subject: [PATCH 07/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index f7041746b..4f78af29b 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['12','latest'] + compiler: ['11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From 59377f25555056395008dfc618ed28ef0ffa91b1 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 22:09:11 -0400 Subject: [PATCH 08/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4f78af29b..2b57fe565 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['11','12','latest'] + compiler: ['10','11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From f1cbbd48ea4ff133f162a3df0ef03b8aa64ab111 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 22:30:14 -0400 Subject: [PATCH 09/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 2b57fe565..19fc63fd6 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['10','11','12','latest'] + compiler: ['9','10','11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From 1733fe63f84eb330604d2f868ae8f35c00904785 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 22:58:36 -0400 Subject: [PATCH 10/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 19fc63fd6..c21012832 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['9','10','11','12','latest'] + compiler: ['9.2','10','11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From ea4805598d66d97913b2e62ee8923e796743f7ff Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 23:31:30 -0400 Subject: [PATCH 11/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index c21012832..78f439286 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['9.2','10','11','12','latest'] + compiler: ['9.5','10','11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From b9b085893112feccc5113dad6debafbb95c9b4a8 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 23:42:43 -0400 Subject: [PATCH 12/46] test --- .github/workflows/ubuntu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 78f439286..edd6b2dc2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,14 +141,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['9.5','10','11','12','latest'] + compiler: ['9','10','11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 - name: Get latest CMake and ninja uses: lukka/get-cmake@v3.27.7 - name: cmake - run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + run: cmake -S . -B build -DJSONCONS_HAS_STATEFUL_ALLOCATOR=0 -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - working-directory: build/ run: cmake --build . --config ubuntu-latest - working-directory: build/ From 198203d5ca8dd7311c6a24f2b295f016ab558d14 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Tue, 21 May 2024 23:58:36 -0400 Subject: [PATCH 13/46] test --- test/bson/src/encode_decode_bson_tests.cpp | 5 +++-- test/cbor/src/encode_cbor_tests.cpp | 5 +++-- test/corelib/src/encode_decode_json_tests.cpp | 5 +++-- test/corelib/src/extension_traits_tests.cpp | 2 -- test/corelib/src/json_reader_tests.cpp | 5 +++-- test/corelib/src/polymorphic_allocator_tests.cpp | 1 - test/corelib/src/scoped_allocator_adaptor_tests.cpp | 5 +++-- test/csv/src/csv_tests.cpp | 8 +++++--- test/csv/src/encode_decode_csv_tests.cpp | 5 +++-- test/jsonpath/src/jsonpath_stateful_allocator_tests.cpp | 5 +++-- test/jsonpointer/src/jsonpointer_tests.cpp | 2 +- test/msgpack/src/encode_msgpack_tests.cpp | 5 +++-- test/ubjson/src/encode_ubjson_tests.cpp | 5 +++-- 13 files changed, 33 insertions(+), 25 deletions(-) diff --git a/test/bson/src/encode_decode_bson_tests.cpp b/test/bson/src/encode_decode_bson_tests.cpp index fb7f258c7..519307f83 100644 --- a/test/bson/src/encode_decode_bson_tests.cpp +++ b/test/bson/src/encode_decode_bson_tests.cpp @@ -3,8 +3,6 @@ #include #include -#include -#include #include #include @@ -182,6 +180,9 @@ TEST_CASE("bson encode array") #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + template using MyScopedAllocator = std::scoped_allocator_adaptor>; using custom_json = basic_json>; diff --git a/test/cbor/src/encode_cbor_tests.cpp b/test/cbor/src/encode_cbor_tests.cpp index eddeed787..4b8279c12 100644 --- a/test/cbor/src/encode_cbor_tests.cpp +++ b/test/cbor/src/encode_cbor_tests.cpp @@ -6,8 +6,6 @@ #endif #include #include -#include -#include #include #include @@ -183,6 +181,9 @@ TEST_CASE("encode_cbor overloads") #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + template using MyScopedAllocator = std::scoped_allocator_adaptor>; diff --git a/test/corelib/src/encode_decode_json_tests.cpp b/test/corelib/src/encode_decode_json_tests.cpp index a7628a0c5..19e258ee1 100644 --- a/test/corelib/src/encode_decode_json_tests.cpp +++ b/test/corelib/src/encode_decode_json_tests.cpp @@ -2,10 +2,8 @@ // Distributed under Boost license #include -#include #include #include -#include #include namespace @@ -276,6 +274,9 @@ TEST_CASE("encode/decode map with integer key") #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + template using MyScopedAllocator = std::scoped_allocator_adaptor>; diff --git a/test/corelib/src/extension_traits_tests.cpp b/test/corelib/src/extension_traits_tests.cpp index 040fcaa5c..1ae891ae5 100644 --- a/test/corelib/src/extension_traits_tests.cpp +++ b/test/corelib/src/extension_traits_tests.cpp @@ -3,13 +3,11 @@ #include #include -#include #include #include #include #include #include -#include #if defined(JSONCONS_HAS_POLYMORPHIC_ALLOCATOR) && JSONCONS_HAS_POLYMORPHIC_ALLOCATOR == 1 #include #endif diff --git a/test/corelib/src/json_reader_tests.cpp b/test/corelib/src/json_reader_tests.cpp index 0589538e6..e113acf81 100644 --- a/test/corelib/src/json_reader_tests.cpp +++ b/test/corelib/src/json_reader_tests.cpp @@ -4,13 +4,11 @@ #include #include #include -#include #include #include #include #include #include -#include using namespace jsoncons; @@ -261,6 +259,9 @@ TEST_CASE("json_reader json lines") #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + TEST_CASE("json_reader stateful allocator tests") { std::string input = R"( diff --git a/test/corelib/src/polymorphic_allocator_tests.cpp b/test/corelib/src/polymorphic_allocator_tests.cpp index 229739a5a..bb1996a2a 100644 --- a/test/corelib/src/polymorphic_allocator_tests.cpp +++ b/test/corelib/src/polymorphic_allocator_tests.cpp @@ -3,7 +3,6 @@ #include #include -#include #if defined(JSONCONS_HAS_POLYMORPHIC_ALLOCATOR) && JSONCONS_HAS_POLYMORPHIC_ALLOCATOR == 1 #include diff --git a/test/corelib/src/scoped_allocator_adaptor_tests.cpp b/test/corelib/src/scoped_allocator_adaptor_tests.cpp index 9ae111d0b..8ddf73ade 100644 --- a/test/corelib/src/scoped_allocator_adaptor_tests.cpp +++ b/test/corelib/src/scoped_allocator_adaptor_tests.cpp @@ -3,17 +3,18 @@ #include #include -#include #include #include #include #include #include #include -#include #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + using namespace jsoncons; template diff --git a/test/csv/src/csv_tests.cpp b/test/csv/src/csv_tests.cpp index 2f456bfaf..524b365a7 100644 --- a/test/csv/src/csv_tests.cpp +++ b/test/csv/src/csv_tests.cpp @@ -7,14 +7,12 @@ //#include #include #include -#include #include #include #include #include #include #include -#include #include using namespace jsoncons; @@ -1501,7 +1499,11 @@ TEST_CASE("csv detect bom") } } /* -#if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 + +#include +#include + TEST_CASE("csv_reader constructors") { const std::string input = R"(Date,1Y,2Y,3Y,5Y diff --git a/test/csv/src/encode_decode_csv_tests.cpp b/test/csv/src/encode_decode_csv_tests.cpp index 8acb33d65..d35ca94e8 100644 --- a/test/csv/src/encode_decode_csv_tests.cpp +++ b/test/csv/src/encode_decode_csv_tests.cpp @@ -5,12 +5,10 @@ #include "windows.h" // test no inadvertant macro expansions #endif #include -#include #include #include #include #include -#include #include using namespace jsoncons; @@ -247,6 +245,9 @@ JSONCONS_ALL_MEMBER_TRAITS(ns::Person, name) #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + template using MyScopedAllocator = std::scoped_allocator_adaptor>; diff --git a/test/jsonpath/src/jsonpath_stateful_allocator_tests.cpp b/test/jsonpath/src/jsonpath_stateful_allocator_tests.cpp index 321784c32..77c3c2dcb 100644 --- a/test/jsonpath/src/jsonpath_stateful_allocator_tests.cpp +++ b/test/jsonpath/src/jsonpath_stateful_allocator_tests.cpp @@ -8,13 +8,14 @@ #include #include #include -#include -#include using namespace jsoncons; #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + template using MyScopedAllocator = std::scoped_allocator_adaptor>; diff --git a/test/jsonpointer/src/jsonpointer_tests.cpp b/test/jsonpointer/src/jsonpointer_tests.cpp index f9237ff74..bc6565656 100644 --- a/test/jsonpointer/src/jsonpointer_tests.cpp +++ b/test/jsonpointer/src/jsonpointer_tests.cpp @@ -14,7 +14,6 @@ #include #include #include -#include using namespace jsoncons; using namespace jsoncons::literals; @@ -505,6 +504,7 @@ TEST_CASE("[jsonpointer] create_if_missing") #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include #include template diff --git a/test/msgpack/src/encode_msgpack_tests.cpp b/test/msgpack/src/encode_msgpack_tests.cpp index a7fc9204f..d99ed1a80 100644 --- a/test/msgpack/src/encode_msgpack_tests.cpp +++ b/test/msgpack/src/encode_msgpack_tests.cpp @@ -7,8 +7,6 @@ #include #include #include -#include -#include #include using namespace jsoncons; @@ -136,6 +134,9 @@ JSONCONS_ALL_MEMBER_TRAITS(ns::Person, name) #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + template using MyScopedAllocator = std::scoped_allocator_adaptor>; diff --git a/test/ubjson/src/encode_ubjson_tests.cpp b/test/ubjson/src/encode_ubjson_tests.cpp index 8e6fd539a..190157e5d 100644 --- a/test/ubjson/src/encode_ubjson_tests.cpp +++ b/test/ubjson/src/encode_ubjson_tests.cpp @@ -8,8 +8,6 @@ #include #include #include -#include -#include #include using namespace jsoncons; @@ -212,6 +210,9 @@ TEST_CASE("encode_ubjson overloads") #if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 +#include +#include + template using MyScopedAllocator = std::scoped_allocator_adaptor>; From f4c0d5d89a19c4ded57fe01d34ddce3fcfe6a45e Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 00:00:52 -0400 Subject: [PATCH 14/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index edd6b2dc2..8e780a5c3 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['9','10','11','12','latest'] + compiler: ['8','9','10','11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 From 8bf200c796c522a51789f86a9f2091c4a809ca23 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 00:29:41 -0400 Subject: [PATCH 15/46] test --- examples/src/jsonpath_location_examples.cpp | 5 ----- test/corelib/src/extension_traits_tests.cpp | 23 ++++++++++++++++----- test/csv/src/csv_tests.cpp | 6 +++--- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/examples/src/jsonpath_location_examples.cpp b/examples/src/jsonpath_location_examples.cpp index 594070bf6..dbbb98917 100644 --- a/examples/src/jsonpath_location_examples.cpp +++ b/examples/src/jsonpath_location_examples.cpp @@ -8,11 +8,6 @@ #include #include #include -#include "FreeListAllocator.hpp" -#include - -template -using MyScopedAllocator = std::scoped_allocator_adaptor>; // for brevity using jsoncons::json; diff --git a/test/corelib/src/extension_traits_tests.cpp b/test/corelib/src/extension_traits_tests.cpp index 1ae891ae5..12f8c22ae 100644 --- a/test/corelib/src/extension_traits_tests.cpp +++ b/test/corelib/src/extension_traits_tests.cpp @@ -8,6 +8,7 @@ #include #include #include + #if defined(JSONCONS_HAS_POLYMORPHIC_ALLOCATOR) && JSONCONS_HAS_POLYMORPHIC_ALLOCATOR == 1 #include #endif @@ -15,22 +16,34 @@ namespace extension_traits = jsoncons::extension_traits; -template -using MyScopedAllocator = std::scoped_allocator_adaptor>; - TEST_CASE("extension_traits tests") { SECTION("is_propagating_allocator") { CHECK_FALSE(jsoncons::extension_traits::is_propagating_allocator>::value); - CHECK_FALSE(jsoncons::extension_traits::is_propagating_allocator>::value); - CHECK(jsoncons::extension_traits::is_propagating_allocator>::value); #if defined(JSONCONS_HAS_POLYMORPHIC_ALLOCATOR) && JSONCONS_HAS_POLYMORPHIC_ALLOCATOR == 1 CHECK(jsoncons::extension_traits::is_propagating_allocator>::value); #endif } } +#if defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) && JSONCONS_HAS_STATEFUL_ALLOCATOR == 1 + +#include +#include +template +using MyScopedAllocator = std::scoped_allocator_adaptor>; + +TEST_CASE("extension_traits tests is_propagating_allocator") +{ + SECTION("is_propagating_allocator") + { + CHECK_FALSE(jsoncons::extension_traits::is_propagating_allocator>::value); + CHECK(jsoncons::extension_traits::is_propagating_allocator>::value); + } +} +#endif + TEST_CASE("extension_traits function object tests") { SECTION("is_unary_function_object") diff --git a/test/csv/src/csv_tests.cpp b/test/csv/src/csv_tests.cpp index 524b365a7..adc218a4b 100644 --- a/test/csv/src/csv_tests.cpp +++ b/test/csv/src/csv_tests.cpp @@ -17,9 +17,6 @@ using namespace jsoncons; -template -using MyScopedAllocator = std::scoped_allocator_adaptor>; - TEST_CASE("csv subfield delimiter tests") { SECTION("n_objects tests") @@ -1504,6 +1501,9 @@ TEST_CASE("csv detect bom") #include #include +template +using MyScopedAllocator = std::scoped_allocator_adaptor>; + TEST_CASE("csv_reader constructors") { const std::string input = R"(Date,1Y,2Y,3Y,5Y From 65f876283de1144e18674dec612d95d83c958e3b Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 00:36:46 -0400 Subject: [PATCH 16/46] test --- test/corelib/src/json_reader_tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/corelib/src/json_reader_tests.cpp b/test/corelib/src/json_reader_tests.cpp index e113acf81..eae1ecbab 100644 --- a/test/corelib/src/json_reader_tests.cpp +++ b/test/corelib/src/json_reader_tests.cpp @@ -12,9 +12,6 @@ using namespace jsoncons; -template -using MyScopedAllocator = std::scoped_allocator_adaptor>; - void test_json_reader_error(const std::string& text, const std::error_code& ec) { REQUIRE_THROWS(json::parse(text)); @@ -262,6 +259,9 @@ TEST_CASE("json_reader json lines") #include #include +template +using MyScopedAllocator = std::scoped_allocator_adaptor>; + TEST_CASE("json_reader stateful allocator tests") { std::string input = R"( From d0ef526d5d7d6f51a88698ae451948fac2d86d84 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 05:09:40 -0400 Subject: [PATCH 17/46] test --- .github/workflows/ubuntu.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 8e780a5c3..0afa9fa33 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -149,8 +149,8 @@ jobs: uses: lukka/get-cmake@v3.27.7 - name: cmake run: cmake -S . -B build -DJSONCONS_HAS_STATEFUL_ALLOCATOR=0 -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - - working-directory: build/ - run: cmake --build . --config ubuntu-latest - - working-directory: build/ - run: ctest -C ubuntu-latest --output-on-failure + - name: build + run: cmake --build build --parallel 10 + - name: test + run: cd build ; ctest -j 10 --output-on-failure From 2a7c389bd321b11498f54bf8dce25acf15504284 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 10:15:32 -0400 Subject: [PATCH 18/46] test --- include/jsoncons/config/compiler_support.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index 6e8bc4645..9e5929d90 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -13,6 +13,22 @@ #include #include +#ifdef __GNUC__ +# define JSONCONS_GCC_VER __GNUC__ +# if defined(__GNUC_PATCHLEVEL__) +# define JSONCONS_GCC_AVAILABLE(major, minor, patch) \ + ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) \ + >= (major * 10000 + minor * 100 + patch)) +# else +# define JSONCONS_GCC_AVAILABLE(major, minor, patch) \ + ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100) \ + >= (major * 10000 + minor * 100 + patch)) +# endif +#else +# define JSONCONS_GCC_VER 0 +# define JSONCONS_GCC_AVAILABLE(major, minor, patch) 0 +#endif + #if defined (__clang__) #define JSONCONS_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #endif @@ -364,7 +380,7 @@ namespace jsoncons { #if !defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) #if defined(__clang__) #define JSONCONS_HAS_STATEFUL_ALLOCATOR 1 -#elif (defined(__GNUC__) && (__GNUC__ == 4)) && (defined(__GNUC__) && __GNUC_MINOR__ < 9) +#elif JSONCONS_GCC_AVAILABLE(10,0,0) // gcc 4.8 basic_string doesn't satisfy C++11 allocator requirements // and gcc doesn't support allocators with no default constructor #else From 0bb5b7331263190179205cd52f4502b2e5d510af Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 10:32:22 -0400 Subject: [PATCH 19/46] test --- include/jsoncons/config/compiler_support.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index 9e5929d90..dc126a244 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -380,7 +380,7 @@ namespace jsoncons { #if !defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) #if defined(__clang__) #define JSONCONS_HAS_STATEFUL_ALLOCATOR 1 -#elif JSONCONS_GCC_AVAILABLE(10,0,0) +#elif !JSONCONS_GCC_AVAILABLE(10,0,0) // gcc 4.8 basic_string doesn't satisfy C++11 allocator requirements // and gcc doesn't support allocators with no default constructor #else From e0c6739bf7cde9d0e5641924ab79046e62f02d69 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 10:44:42 -0400 Subject: [PATCH 20/46] test --- include/jsoncons/config/compiler_support.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index dc126a244..2815a098d 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -380,7 +380,7 @@ namespace jsoncons { #if !defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) #if defined(__clang__) #define JSONCONS_HAS_STATEFUL_ALLOCATOR 1 -#elif !JSONCONS_GCC_AVAILABLE(10,0,0) +#elif defined(__GNUC__) && !JSONCONS_GCC_AVAILABLE(10,0,0) // gcc 4.8 basic_string doesn't satisfy C++11 allocator requirements // and gcc doesn't support allocators with no default constructor #else From 8d08db275db646e2f8943e45b51fa5ada75f0b92 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 11:24:51 -0400 Subject: [PATCH 21/46] test --- include/jsoncons/config/compiler_support.hpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index 2815a098d..8ea921d2b 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -13,8 +13,7 @@ #include #include -#ifdef __GNUC__ -# define JSONCONS_GCC_VER __GNUC__ +#if defined(__GNUC__) # if defined(__GNUC_PATCHLEVEL__) # define JSONCONS_GCC_AVAILABLE(major, minor, patch) \ ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) \ @@ -24,14 +23,12 @@ ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100) \ >= (major * 10000 + minor * 100 + patch)) # endif -#else -# define JSONCONS_GCC_VER 0 -# define JSONCONS_GCC_AVAILABLE(major, minor, patch) 0 -#endif -#if defined (__clang__) -#define JSONCONS_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) -#endif +#if defined(__clang__) +# define JSONCONS_CLANG_AVAILABLE(major, minor, patch) \ + ((__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) \ + >= (major * 10000 + minor * 100 + patch)) +# endif // Uncomment the following line to suppress deprecated names (recommended for new code) //#define JSONCONS_NO_DEPRECATED @@ -205,8 +202,8 @@ # if (defined JSONCONS_HAS_2017) # if defined(__clang__) # if defined(__APPLE__) -# if JSONCONS_CLANG_VERSION >= 100001 -# define JSONCONS_HAS_STD_VARIANT 1 +# if JSONCONS_CLANG_AVAILABLE(10,0,1) +# define JSONCONS_HAS_STD_VARIANT 1 # endif # elif __has_include() # define JSONCONS_HAS_STD_VARIANT 1 From 62368aa5df5b2e3247cce8770c4e2686b19658bd Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 11:34:47 -0400 Subject: [PATCH 22/46] test --- include/jsoncons/config/compiler_support.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index 8ea921d2b..28ce39411 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -23,12 +23,17 @@ ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100) \ >= (major * 10000 + minor * 100 + patch)) # endif +# else +# define JSONCONS_GCC_AVAILABLE(major, minor, patch) 0 +#endif #if defined(__clang__) -# define JSONCONS_CLANG_AVAILABLE(major, minor, patch) \ +# define JSONCONS_CLANG_AVAILABLE(major, minor, patch) \ ((__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) \ >= (major * 10000 + minor * 100 + patch)) -# endif +# else +# define JSONCONS_CLANG_AVAILABLE(major, minor, patch) 0 +#endif // Uncomment the following line to suppress deprecated names (recommended for new code) //#define JSONCONS_NO_DEPRECATED From 8e0cc4129b7bec177075ca12a8477beeaced8525 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 12:33:46 -0400 Subject: [PATCH 23/46] test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 0afa9fa33..039d0c2b5 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -148,7 +148,7 @@ jobs: - name: Get latest CMake and ninja uses: lukka/get-cmake@v3.27.7 - name: cmake - run: cmake -S . -B build -DJSONCONS_HAS_STATEFUL_ALLOCATOR=0 -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - name: build run: cmake --build build --parallel 10 - name: test From 999c65b6a75bf8e88b3cf5dd7a1f07773a0b658f Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 16:45:45 -0400 Subject: [PATCH 24/46] cmake --- test/CMakeLists.txt | 247 ++++++++++++++++++++++---------------------- 1 file changed, 123 insertions(+), 124 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c4c348f8e..9cb0f3d00 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -59,136 +59,135 @@ endif() target_include_directories (catch INTERFACE ${CATCH_INCLUDE_DIR}) add_executable(unit_tests - bson/src/bson_cursor_tests.cpp - bson/src/bson_encoder_tests.cpp - bson/src/bson_reader_tests.cpp - bson/src/bson_decimal128_tests.cpp - bson/src/bson_oid_tests.cpp - bson/src/bson_test_suite.cpp - bson/src/encode_decode_bson_tests.cpp - cbor/src/cbor_bitset_traits_tests.cpp - cbor/src/cbor_cursor_tests.cpp - cbor/src/cbor_event_reader_tests.cpp - cbor/src/cbor_encoder_tests.cpp - cbor/src/cbor_event_visitor_tests.cpp - cbor/src/cbor_reader_tests.cpp - cbor/src/cbor_tests.cpp - cbor/src/cbor_typed_array_tests.cpp - cbor/src/decode_cbor_tests.cpp + #bson/src/bson_cursor_tests.cpp + #bson/src/bson_encoder_tests.cpp + #bson/src/bson_reader_tests.cpp + #bson/src/bson_decimal128_tests.cpp + #bson/src/bson_oid_tests.cpp + #bson/src/bson_test_suite.cpp + #bson/src/encode_decode_bson_tests.cpp + #cbor/src/cbor_bitset_traits_tests.cpp + #cbor/src/cbor_cursor_tests.cpp + #cbor/src/cbor_event_reader_tests.cpp + #cbor/src/cbor_encoder_tests.cpp + #cbor/src/cbor_event_visitor_tests.cpp + #cbor/src/cbor_reader_tests.cpp + #cbor/src/cbor_tests.cpp + #cbor/src/cbor_typed_array_tests.cpp + #cbor/src/decode_cbor_tests.cpp cbor/src/encode_cbor_tests.cpp - csv/src/csv_cursor_tests.cpp - csv/src/csv_subfield_tests.cpp - csv/src/csv_tests.cpp - csv/src/encode_decode_csv_tests.cpp - #fuzz_regression/src/fuzz_regression_tests.cpp - jmespath/src/jmespath_expression_tests.cpp - jmespath/src/jmespath_tests.cpp - mergepatch/src/mergepatch_test_suite.cpp - jsonpatch/src/jsonpatch_test_suite.cpp - jsonpatch/src/jsonpatch_tests.cpp - jsonpath/src/jsonpath_flatten_tests.cpp - jsonpath/src/path_node_tests.cpp - jsonpath/src/json_location_tests.cpp - jsonpath/src/json_location_parser_tests.cpp - jsonpath/src/jsonpath_custom_function_tests.cpp - jsonpath/src/jsonpath_json_query_tests.cpp - jsonpath/src/jsonpath_expression_tests.cpp - jsonpath/src/jsonpath_json_replace_tests.cpp - jsonpath/src/jsonpath_select_paths_tests.cpp - jsonpath/src/jsonpath_test_suite.cpp - jsonpath/src/jsonpath_stateful_allocator_tests.cpp - jsonpointer/src/jsonpointer_flatten_tests.cpp - jsonpointer/src/jsonpointer_tests.cpp + #csv/src/csv_cursor_tests.cpp + #csv/src/csv_subfield_tests.cpp + #csv/src/csv_tests.cpp + #csv/src/encode_decode_csv_tests.cpp + #jmespath/src/jmespath_expression_tests.cpp + #jmespath/src/jmespath_tests.cpp + #mergepatch/src/mergepatch_test_suite.cpp + #jsonpatch/src/jsonpatch_test_suite.cpp + #jsonpatch/src/jsonpatch_tests.cpp + #jsonpath/src/jsonpath_flatten_tests.cpp + #jsonpath/src/path_node_tests.cpp + #jsonpath/src/json_location_tests.cpp + #jsonpath/src/json_location_parser_tests.cpp + #jsonpath/src/jsonpath_custom_function_tests.cpp + #jsonpath/src/jsonpath_json_query_tests.cpp + #jsonpath/src/jsonpath_expression_tests.cpp + #jsonpath/src/jsonpath_json_replace_tests.cpp + #jsonpath/src/jsonpath_select_paths_tests.cpp + #jsonpath/src/jsonpath_test_suite.cpp + #jsonpath/src/jsonpath_stateful_allocator_tests.cpp + #jsonpointer/src/jsonpointer_flatten_tests.cpp + #jsonpointer/src/jsonpointer_tests.cpp jsonschema/src/abort_early_tests.cpp - jsonschema/src/json_schema_walk_tests.cpp + #jsonschema/src/json_schema_walk_tests.cpp jsonschema/src/format_validator_tests.cpp - jsonschema/src/validation_report_tests.cpp - jsonschema/src/dynamic_ref_tests.cpp - jsonschema/src/jsonschema_defaults_tests.cpp - jsonschema/src/jsonschema_draft4_tests.cpp - jsonschema/src/jsonschema_draft6_tests.cpp - jsonschema/src/jsonschema_draft7_tests.cpp - jsonschema/src/jsonschema_draft201909_tests.cpp + #jsonschema/src/validation_report_tests.cpp + #jsonschema/src/dynamic_ref_tests.cpp + #jsonschema/src/jsonschema_defaults_tests.cpp + #jsonschema/src/jsonschema_draft4_tests.cpp + #jsonschema/src/jsonschema_draft6_tests.cpp + #jsonschema/src/jsonschema_draft7_tests.cpp + #jsonschema/src/jsonschema_draft201909_tests.cpp jsonschema/src/jsonschema_draft202012_tests.cpp - jsonschema/src/schema_version_tests.cpp - msgpack/src/decode_msgpack_tests.cpp - msgpack/src/encode_msgpack_tests.cpp - msgpack/src/msgpack_bitset_traits_tests.cpp - msgpack/src/msgpack_cursor_tests.cpp - msgpack/src/msgpack_event_reader_tests.cpp - msgpack/src/msgpack_encoder_tests.cpp - msgpack/src/msgpack_tests.cpp - msgpack/src/msgpack_timestamp_tests.cpp - corelib/src/bigint_tests.cpp - corelib/src/source_adaptor_tests.cpp - corelib/src/byte_string_tests.cpp - corelib/src/value_converter_tests.cpp - corelib/src/decode_traits_tests.cpp - corelib/src/detail/optional_tests.cpp - corelib/src/detail/span_tests.cpp - corelib/src/detail/string_view_tests.cpp - corelib/src/detail/heap_string_tests.cpp - corelib/src/detail/to_integer_tests.cpp - corelib/src/double_round_trip_tests.cpp - corelib/src/double_to_string_tests.cpp - corelib/src/dtoa_tests.cpp - corelib/src/encode_decode_json_tests.cpp - corelib/src/encode_traits_tests.cpp - corelib/src/error_recovery_tests.cpp + #jsonschema/src/schema_version_tests.cpp + #msgpack/src/decode_msgpack_tests.cpp + #msgpack/src/encode_msgpack_tests.cpp + #msgpack/src/msgpack_bitset_traits_tests.cpp + #msgpack/src/msgpack_cursor_tests.cpp + #msgpack/src/msgpack_event_reader_tests.cpp + #msgpack/src/msgpack_encoder_tests.cpp + #msgpack/src/msgpack_tests.cpp + #msgpack/src/msgpack_timestamp_tests.cpp + #corelib/src/bigint_tests.cpp + #corelib/src/source_adaptor_tests.cpp + #corelib/src/byte_string_tests.cpp + #corelib/src/value_converter_tests.cpp + #corelib/src/decode_traits_tests.cpp + #corelib/src/detail/optional_tests.cpp + #corelib/src/detail/span_tests.cpp + #corelib/src/detail/string_view_tests.cpp + #corelib/src/detail/heap_string_tests.cpp + #corelib/src/detail/to_integer_tests.cpp + #corelib/src/double_round_trip_tests.cpp + #corelib/src/double_to_string_tests.cpp + #corelib/src/dtoa_tests.cpp + #corelib/src/encode_decode_json_tests.cpp + #corelib/src/encode_traits_tests.cpp + #corelib/src/error_recovery_tests.cpp corelib/src/json_array_tests.cpp - corelib/src/json_as_tests.cpp - corelib/src/json_bitset_traits_tests.cpp - corelib/src/json_checker_tests.cpp - corelib/src/json_comparator_tests.cpp - corelib/src/json_const_pointer_tests.cpp - corelib/src/json_constructor_tests.cpp - corelib/src/json_cursor_tests.cpp - corelib/src/json_encoder_tests.cpp - corelib/src/json_exception_tests.cpp - corelib/src/json_filter_tests.cpp - corelib/src/json_in_place_update_tests.cpp - corelib/src/json_integer_tests.cpp - corelib/src/json_less_tests.cpp - corelib/src/json_line_split_tests.cpp - corelib/src/json_literal_operator_tests.cpp + #corelib/src/json_as_tests.cpp + #corelib/src/json_bitset_traits_tests.cpp + #corelib/src/json_checker_tests.cpp + #corelib/src/json_comparator_tests.cpp + #corelib/src/json_const_pointer_tests.cpp + #corelib/src/json_constructor_tests.cpp + #corelib/src/json_cursor_tests.cpp + #corelib/src/json_encoder_tests.cpp + #corelib/src/json_exception_tests.cpp + #corelib/src/json_filter_tests.cpp + #corelib/src/json_in_place_update_tests.cpp + #corelib/src/json_integer_tests.cpp + #corelib/src/json_less_tests.cpp + #corelib/src/json_line_split_tests.cpp + #corelib/src/json_literal_operator_tests.cpp corelib/src/json_object_tests.cpp - corelib/src/ojson_object_tests.cpp - corelib/src/json_options_tests.cpp - corelib/src/json_parse_error_tests.cpp - corelib/src/json_parser_position_tests.cpp - corelib/src/json_parser_tests.cpp - corelib/src/json_proxy_tests.cpp - corelib/src/json_push_back_tests.cpp - corelib/src/json_reader_exception_tests.cpp - corelib/src/json_reader_tests.cpp - corelib/src/json_storage_tests.cpp - corelib/src/json_swap_tests.cpp - corelib/src/json_traits_macro_functional_tests.cpp - corelib/src/json_traits_macro_tests.cpp - corelib/src/json_traits_macro_limit_tests.cpp - corelib/src/json_traits_name_macro_tests.cpp - corelib/src/json_type_traits_chrono_tests.cpp - corelib/src/json_type_traits_container_tests.cpp - corelib/src/json_type_traits_tests.cpp - corelib/src/uri_tests.cpp - corelib/src/json_validation_tests.cpp - corelib/src/jsoncons_tests.cpp - corelib/src/JSONTestSuite_tests.cpp - corelib/src/ojson_tests.cpp - corelib/src/parse_string_tests.cpp - corelib/src/short_string_tests.cpp - corelib/src/source_tests.cpp - corelib/src/staj_iterator_tests.cpp - corelib/src/extension_traits_tests.cpp - corelib/src/polymorphic_allocator_tests.cpp - corelib/src/scoped_allocator_adaptor_tests.cpp - corelib/src/string_to_double_tests.cpp - corelib/src/unicode_conv_tests.cpp - corelib/src/wjson_tests.cpp - ubjson/src/decode_ubjson_tests.cpp - ubjson/src/encode_ubjson_tests.cpp - ubjson/src/ubjson_cursor_tests.cpp - ubjson/src/ubjson_encoder_tests.cpp + #corelib/src/ojson_object_tests.cpp + #corelib/src/json_options_tests.cpp + #corelib/src/json_parse_error_tests.cpp + #corelib/src/json_parser_position_tests.cpp + #corelib/src/json_parser_tests.cpp + #corelib/src/json_proxy_tests.cpp + #corelib/src/json_push_back_tests.cpp + #corelib/src/json_reader_exception_tests.cpp + #corelib/src/json_reader_tests.cpp + #corelib/src/json_storage_tests.cpp + #corelib/src/json_swap_tests.cpp + #corelib/src/json_traits_macro_functional_tests.cpp + #corelib/src/json_traits_macro_tests.cpp + #corelib/src/json_traits_macro_limit_tests.cpp + #corelib/src/json_traits_name_macro_tests.cpp + #corelib/src/json_type_traits_chrono_tests.cpp + #corelib/src/json_type_traits_container_tests.cpp + #corelib/src/json_type_traits_tests.cpp + #corelib/src/uri_tests.cpp + #corelib/src/json_validation_tests.cpp + #corelib/src/jsoncons_tests.cpp + #corelib/src/JSONTestSuite_tests.cpp + #corelib/src/ojson_tests.cpp + #corelib/src/parse_string_tests.cpp + #corelib/src/short_string_tests.cpp + #corelib/src/source_tests.cpp + #corelib/src/staj_iterator_tests.cpp + #corelib/src/extension_traits_tests.cpp + #corelib/src/polymorphic_allocator_tests.cpp + #corelib/src/scoped_allocator_adaptor_tests.cpp + #corelib/src/string_to_double_tests.cpp + #corelib/src/unicode_conv_tests.cpp + #corelib/src/wjson_tests.cpp + #ubjson/src/decode_ubjson_tests.cpp + #ubjson/src/encode_ubjson_tests.cpp + #ubjson/src/ubjson_cursor_tests.cpp + #ubjson/src/ubjson_encoder_tests.cpp corelib/src/testmain.cpp ) From 5303f0bc8f7ce04080b410694dd42f0264a449cc Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 16:54:25 -0400 Subject: [PATCH 25/46] ubuntu --- .github/workflows/ubuntu.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 039d0c2b5..81c5ad11f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -154,3 +154,24 @@ jobs: - name: test run: cd build ; ctest -j 10 --output-on-failure + ci_test_compilers_clang: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15-bullseye', 'latest'] + container: silkeh/clang:${{ matrix.compiler }} + steps: + - name: Install unzip and git + run: apt-get update ; apt-get install -y unzip git + - uses: actions/checkout@v3 + - name: Get latest CMake and ninja + uses: lukka/get-cmake@v3.27.7 + - name: cmake + run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++11 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + - name: build + working-directory: build/ + run: cmake --build . --parallel 10 + - name: test + working-directory: build/ + run: ctest -j 10 --output-on-failure + From 93f9f16a6730ae8d47e74412cf780f8b0f0b8666 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 17:09:05 -0400 Subject: [PATCH 26/46] clang test --- include/jsoncons/config/compiler_support.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index 28ce39411..0283c1728 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -365,8 +365,10 @@ namespace jsoncons { #if defined(_MSC_VER) && _MSC_VER <= 1900 #define JSONCONS_CONSTEXPR -#else +#elif defined(JSONCONS_HAS_CP14) #define JSONCONS_CONSTEXPR constexpr +#else +#define JSONCONS_CONSTEXPR #endif #if !defined(JSONCONS_HAS_STD_REGEX) From 5a636d33676271cf4138da22ee7d43eccac02c8f Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 17:18:06 -0400 Subject: [PATCH 27/46] clang test --- include/jsoncons/config/compiler_support.hpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index 0283c1728..619651406 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -363,9 +363,7 @@ namespace jsoncons { #define JSONCONS_COPY(first,last,d_first) std::copy(first, last, d_first) #endif -#if defined(_MSC_VER) && _MSC_VER <= 1900 -#define JSONCONS_CONSTEXPR -#elif defined(JSONCONS_HAS_CP14) +#if defined(JSONCONS_HAS_CP14) #define JSONCONS_CONSTEXPR constexpr #else #define JSONCONS_CONSTEXPR @@ -382,11 +380,8 @@ namespace jsoncons { #endif #if !defined(JSONCONS_HAS_STATEFUL_ALLOCATOR) -#if defined(__clang__) -#define JSONCONS_HAS_STATEFUL_ALLOCATOR 1 +#if defined(__clang__) && !JSONCONS_CLANG_AVAILABLE(11,0,0) #elif defined(__GNUC__) && !JSONCONS_GCC_AVAILABLE(10,0,0) -// gcc 4.8 basic_string doesn't satisfy C++11 allocator requirements -// and gcc doesn't support allocators with no default constructor #else #define JSONCONS_HAS_STATEFUL_ALLOCATOR 1 #endif From ba9f866743ae5db32a8043c24101f22a9c6c3246 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 17:34:04 -0400 Subject: [PATCH 28/46] clang test --- include/jsoncons/json_encoder.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/jsoncons/json_encoder.hpp b/include/jsoncons/json_encoder.hpp index 849ab726d..943ec6276 100644 --- a/include/jsoncons/json_encoder.hpp +++ b/include/jsoncons/json_encoder.hpp @@ -1065,17 +1065,17 @@ namespace detail { { static const std::array& null_constant() { - static constexpr std::array k{'n','u','l','l'}; + static constexpr std::array k{{'n','u','l','l'}}; return k; } static const std::array& true_constant() { - static constexpr std::array k{'t','r','u','e'}; + static constexpr std::array k{{'t','r','u','e'}}; return k; } static const std::array& false_constant() { - static constexpr std::array k{'f','a','l','s','e'}; + static constexpr std::array k{{'f','a','l','s','e'}}; return k; } public: From 58370765045a39fc00ea16fe986ba5cde0f0f340 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 17:50:18 -0400 Subject: [PATCH 29/46] clang test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 81c5ad11f..fa13435d2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -158,7 +158,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15-bullseye', 'latest'] + compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git From f0a939331a1c1191cb8f2c21b9372fe6f750ea3b Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 17:55:20 -0400 Subject: [PATCH 30/46] clang test --- .github/workflows/ubuntu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index fa13435d2..bdaa164d3 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -158,7 +158,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] + # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] + compiler: ['9', '10', '11', '12', '13', '15-bullseye', 'latest'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git From 7c81deeabe604886999d0c26d3c70258348ce4b6 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 17:56:19 -0400 Subject: [PATCH 31/46] clang test --- .github/workflows/ubuntu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bdaa164d3..5cb4cc6ba 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -171,8 +171,8 @@ jobs: run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++11 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - name: build working-directory: build/ - run: cmake --build . --parallel 10 + run: cmake --build . - name: test working-directory: build/ - run: ctest -j 10 --output-on-failure + run: ctest --output-on-failure From f7d05fab7708ebdcce8015b74c2105d005711d69 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 18:11:42 -0400 Subject: [PATCH 32/46] clang test --- .github/workflows/ubuntu.yml | 2 +- include/jsoncons/json_object.hpp | 2 +- test/corelib/src/json_object_tests.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 5cb4cc6ba..5d16a3eb9 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -159,7 +159,7 @@ jobs: strategy: matrix: # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] - compiler: ['9', '10', '11', '12', '13', '15-bullseye', 'latest'] + compiler: ['7','8','9', '10', '11', '12', '13', '15-bullseye'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git diff --git a/include/jsoncons/json_object.hpp b/include/jsoncons/json_object.hpp index d6f37c92b..7d9832fc3 100644 --- a/include/jsoncons/json_object.hpp +++ b/include/jsoncons/json_object.hpp @@ -353,7 +353,7 @@ namespace jsoncons { { members_.emplace_back(key_type(s->first,get_allocator()), s->second); } - std::stable_sort(members_.begin(),members_.end(), + std::stable_sort(members_.begin(), members_.end(), [](const key_value_type& a, const key_value_type& b) -> bool {return a.key().compare(b.key()) < 0;}); auto it = std::unique(members_.begin(), members_.end(), [](const key_value_type& a, const key_value_type& b) -> bool { return !(a.key().compare(b.key()));}); diff --git a/test/corelib/src/json_object_tests.cpp b/test/corelib/src/json_object_tests.cpp index a5a73fd5f..a4e7502f7 100644 --- a/test/corelib/src/json_object_tests.cpp +++ b/test/corelib/src/json_object_tests.cpp @@ -19,7 +19,7 @@ TEST_CASE("json(json_object_arg, first, last)") { std::map m = {{"c",1},{"b",2},{"a",3}}; - json j(json_object_arg, m.begin(),m.end()); + json j{{json_object_arg, m.begin(), m.end()}}; REQUIRE(j.size() == 3); auto it = j.object_range().begin(); From ce2d91b3ebbe6cb7993f687ec0fc2c6edc73be49 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 18:18:33 -0400 Subject: [PATCH 33/46] clang test --- test/corelib/src/json_object_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/corelib/src/json_object_tests.cpp b/test/corelib/src/json_object_tests.cpp index a4e7502f7..a5a73fd5f 100644 --- a/test/corelib/src/json_object_tests.cpp +++ b/test/corelib/src/json_object_tests.cpp @@ -19,7 +19,7 @@ TEST_CASE("json(json_object_arg, first, last)") { std::map m = {{"c",1},{"b",2},{"a",3}}; - json j{{json_object_arg, m.begin(), m.end()}}; + json j(json_object_arg, m.begin(),m.end()); REQUIRE(j.size() == 3); auto it = j.object_range().begin(); From cf20533a43fbf95f54421508c83ceda1f7fc7d52 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 18:27:25 -0400 Subject: [PATCH 34/46] clang test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 5d16a3eb9..9fbecda41 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -159,7 +159,7 @@ jobs: strategy: matrix: # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] - compiler: ['7','8','9', '10', '11', '12', '13', '15-bullseye'] + compiler: ['5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git From 006fec48429fceb8b78b474ddef7ccbbe6c60e98 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 18:36:07 -0400 Subject: [PATCH 35/46] clang test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 9fbecda41..4110ccc74 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -159,7 +159,7 @@ jobs: strategy: matrix: # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] - compiler: ['5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] + compiler: ['3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git From d1a1d2e86264f2ea1f8f9340b18da2c4b0f33788 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 18:42:30 -0400 Subject: [PATCH 36/46] clang test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4110ccc74..aa3900b14 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -159,7 +159,7 @@ jobs: strategy: matrix: # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] - compiler: ['3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] + compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git From 7114030f428c848045405c09ea4ca9e69cca27c3 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 18:53:05 -0400 Subject: [PATCH 37/46] clang test --- .github/workflows/ubuntu.yml | 2 +- include/jsoncons/config/compiler_support.hpp | 5 --- include/jsoncons/json_array.hpp | 32 -------------------- include/jsoncons/json_object.hpp | 27 ----------------- include/jsoncons_ext/cbor/cbor_encoder.hpp | 2 -- 5 files changed, 1 insertion(+), 67 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index aa3900b14..90a99055c 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -159,7 +159,7 @@ jobs: strategy: matrix: # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] - compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] + compiler: ['3.8', '3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git diff --git a/include/jsoncons/config/compiler_support.hpp b/include/jsoncons/config/compiler_support.hpp index 619651406..03684e55a 100644 --- a/include/jsoncons/config/compiler_support.hpp +++ b/include/jsoncons/config/compiler_support.hpp @@ -42,11 +42,6 @@ // MIT license // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54577 -#if defined(__clang__) -#elif defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 9) -#define JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR 1 -#define JSONCONS_NO_MAP_CONS_TAKES_ALLOCATOR 1 -#endif #if defined(__clang__) # define JSONCONS_FALLTHROUGH [[clang::fallthrough]] diff --git a/include/jsoncons/json_array.hpp b/include/jsoncons/json_array.hpp index 8af23407a..8ffd956a4 100644 --- a/include/jsoncons/json_array.hpp +++ b/include/jsoncons/json_array.hpp @@ -167,23 +167,12 @@ namespace jsoncons { iterator erase(const_iterator pos) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = elements_.begin() + (pos - elements_.begin()); - return elements_.erase(it); - #else return elements_.erase(pos); - #endif } iterator erase(const_iterator first, const_iterator last) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it1 = elements_.begin() + (first - elements_.begin()); - iterator it2 = elements_.begin() + (last - elements_.begin()); - return elements_.erase(it1,it2); - #else return elements_.erase(first,last); - #endif } Json& operator[](std::size_t i) {return elements_[i];} @@ -210,47 +199,26 @@ namespace jsoncons { typename std::enable_if::value,iterator>::type insert(const_iterator pos, T&& value) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = elements_.begin() + (pos - elements_.begin()); - return elements_.emplace(it, std::forward(value)); - #else return elements_.emplace(pos, std::forward(value)); - #endif } template typename std::enable_if::value,iterator>::type insert(const_iterator pos, T&& value) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = elements_.begin() + (pos - elements_.begin()); - return elements_.emplace(it, std::forward(value)); - #else return elements_.emplace(pos, std::forward(value)); - #endif } template iterator insert(const_iterator pos, InputIt first, InputIt last) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = elements_.begin() + (pos - elements_.begin()); - elements_.insert(it, first, last); - return first == last ? it : it + 1; - #else return elements_.insert(pos, first, last); - #endif } template typename std::enable_if::value,iterator>::type emplace(const_iterator pos, Args&&... args) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = elements_.begin() + (pos - elements_.begin()); - return elements_.emplace(it, std::forward(args)...); - #else return elements_.emplace(pos, std::forward(args)...); - #endif } template diff --git a/include/jsoncons/json_object.hpp b/include/jsoncons/json_object.hpp index 7d9832fc3..b965636c6 100644 --- a/include/jsoncons/json_object.hpp +++ b/include/jsoncons/json_object.hpp @@ -458,23 +458,12 @@ namespace jsoncons { iterator erase(const_iterator pos) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = members_.begin() + (pos - members_.begin()); - return members_.erase(it); - #else return members_.erase(pos); - #endif } iterator erase(const_iterator first, const_iterator last) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it1 = members_.begin() + (first - members_.begin()); - iterator it2 = members_.begin() + (last - members_.begin()); - return members_.erase(it1,it2); - #else return members_.erase(first,last); - #endif } void erase(const string_view_type& name) @@ -1224,12 +1213,7 @@ namespace jsoncons { { if (pos != members_.end()) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = members_.begin() + (pos - members_.begin()); - return members_.erase(it); - #else return members_.erase(pos); - #endif } else { @@ -1245,13 +1229,7 @@ namespace jsoncons { if (pos1 < members_.size() && pos2 <= members_.size()) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it1 = members_.begin() + (first - members_.begin()); - iterator it2 = members_.begin() + (last - members_.begin()); - return members_.erase(it1,it2); - #else return members_.erase(first,last); - #endif } else { @@ -1264,12 +1242,7 @@ namespace jsoncons { auto pos = find(name); if (pos != members_.end()) { - #if defined(JSONCONS_NO_VECTOR_ERASE_TAKES_CONST_ITERATOR) - iterator it = members_.begin() + (pos - members_.begin()); - members_.erase(it); - #else members_.erase(pos); - #endif } } diff --git a/include/jsoncons_ext/cbor/cbor_encoder.hpp b/include/jsoncons_ext/cbor/cbor_encoder.hpp index 1ccd677af..a29e3d3b5 100644 --- a/include/jsoncons_ext/cbor/cbor_encoder.hpp +++ b/include/jsoncons_ext/cbor/cbor_encoder.hpp @@ -111,10 +111,8 @@ class basic_cbor_encoder final : public basic_json_visitor options_(options), alloc_(alloc), stack_(alloc), -#if !defined(JSONCONS_NO_MAP_CONS_TAKES_ALLOCATOR) stringref_map_(alloc), bytestringref_map_(alloc), -#endif nesting_depth_(0) { if (options.pack_strings()) From 2a00f87b76da966688e10d410133792125ae8f4e Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 18:58:46 -0400 Subject: [PATCH 38/46] clang test --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 90a99055c..4110ccc74 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -159,7 +159,7 @@ jobs: strategy: matrix: # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] - compiler: ['3.8', '3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] + compiler: ['3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git From d8096ca5d8c3a3953d03f179a41ce62b9797ade9 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 19:05:38 -0400 Subject: [PATCH 39/46] CMakeLists --- .github/workflows/ubuntu.yml | 4 +- test/CMakeLists.txt | 248 +++++++++++++++++------------------ 2 files changed, 126 insertions(+), 126 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4110ccc74..8ad7def49 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -150,9 +150,9 @@ jobs: - name: cmake run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - name: build - run: cmake --build build --parallel 10 + run: cmake --build build - name: test - run: cd build ; ctest -j 10 --output-on-failure + run: cd build ; ctest --output-on-failure ci_test_compilers_clang: runs-on: ubuntu-latest diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9cb0f3d00..09754f3f7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -59,135 +59,135 @@ endif() target_include_directories (catch INTERFACE ${CATCH_INCLUDE_DIR}) add_executable(unit_tests - #bson/src/bson_cursor_tests.cpp - #bson/src/bson_encoder_tests.cpp - #bson/src/bson_reader_tests.cpp - #bson/src/bson_decimal128_tests.cpp - #bson/src/bson_oid_tests.cpp - #bson/src/bson_test_suite.cpp - #bson/src/encode_decode_bson_tests.cpp - #cbor/src/cbor_bitset_traits_tests.cpp - #cbor/src/cbor_cursor_tests.cpp - #cbor/src/cbor_event_reader_tests.cpp - #cbor/src/cbor_encoder_tests.cpp - #cbor/src/cbor_event_visitor_tests.cpp - #cbor/src/cbor_reader_tests.cpp - #cbor/src/cbor_tests.cpp - #cbor/src/cbor_typed_array_tests.cpp - #cbor/src/decode_cbor_tests.cpp + bson/src/bson_cursor_tests.cpp + bson/src/bson_encoder_tests.cpp + bson/src/bson_reader_tests.cpp + bson/src/bson_decimal128_tests.cpp + bson/src/bson_oid_tests.cpp + bson/src/bson_test_suite.cpp + bson/src/encode_decode_bson_tests.cpp + cbor/src/cbor_bitset_traits_tests.cpp + cbor/src/cbor_cursor_tests.cpp + cbor/src/cbor_event_reader_tests.cpp + cbor/src/cbor_encoder_tests.cpp + cbor/src/cbor_event_visitor_tests.cpp + cbor/src/cbor_reader_tests.cpp + cbor/src/cbor_tests.cpp + cbor/src/cbor_typed_array_tests.cpp + cbor/src/decode_cbor_tests.cpp cbor/src/encode_cbor_tests.cpp - #csv/src/csv_cursor_tests.cpp - #csv/src/csv_subfield_tests.cpp - #csv/src/csv_tests.cpp - #csv/src/encode_decode_csv_tests.cpp - #jmespath/src/jmespath_expression_tests.cpp - #jmespath/src/jmespath_tests.cpp - #mergepatch/src/mergepatch_test_suite.cpp - #jsonpatch/src/jsonpatch_test_suite.cpp - #jsonpatch/src/jsonpatch_tests.cpp - #jsonpath/src/jsonpath_flatten_tests.cpp - #jsonpath/src/path_node_tests.cpp - #jsonpath/src/json_location_tests.cpp - #jsonpath/src/json_location_parser_tests.cpp - #jsonpath/src/jsonpath_custom_function_tests.cpp - #jsonpath/src/jsonpath_json_query_tests.cpp - #jsonpath/src/jsonpath_expression_tests.cpp - #jsonpath/src/jsonpath_json_replace_tests.cpp - #jsonpath/src/jsonpath_select_paths_tests.cpp - #jsonpath/src/jsonpath_test_suite.cpp - #jsonpath/src/jsonpath_stateful_allocator_tests.cpp - #jsonpointer/src/jsonpointer_flatten_tests.cpp - #jsonpointer/src/jsonpointer_tests.cpp - jsonschema/src/abort_early_tests.cpp - #jsonschema/src/json_schema_walk_tests.cpp + csv/src/csv_cursor_tests.cpp + csv/src/csv_subfield_tests.cpp + csv/src/csv_tests.cpp + csv/src/encode_decode_csv_tests.cpp + jmespath/src/jmespath_expression_tests.cpp + jmespath/src/jmespath_tests.cpp + mergepatch/src/mergepatch_test_suite.cpp + jsonpatch/src/jsonpatch_test_suite.cpp + jsonpatch/src/jsonpatch_tests.cpp + jsonpath/src/jsonpath_flatten_tests.cpp + jsonpath/src/path_node_tests.cpp + jsonpath/src/json_location_tests.cpp + jsonpath/src/json_location_parser_tests.cpp + jsonpath/src/jsonpath_custom_function_tests.cpp + jsonpath/src/jsonpath_json_query_tests.cpp + jsonpath/src/jsonpath_expression_tests.cpp + jsonpath/src/jsonpath_json_replace_tests.cpp + jsonpath/src/jsonpath_select_paths_tests.cpp + jsonpath/src/jsonpath_test_suite.cpp + jsonpath/src/jsonpath_stateful_allocator_tests.cpp + jsonpointer/src/jsonpointer_flatten_tests.cpp + jsonpointer/src/jsonpointer_tests.cpp + sonschema/src/abort_early_tests.cpp + jsonschema/src/json_schema_walk_tests.cpp jsonschema/src/format_validator_tests.cpp - #jsonschema/src/validation_report_tests.cpp - #jsonschema/src/dynamic_ref_tests.cpp - #jsonschema/src/jsonschema_defaults_tests.cpp - #jsonschema/src/jsonschema_draft4_tests.cpp - #jsonschema/src/jsonschema_draft6_tests.cpp - #jsonschema/src/jsonschema_draft7_tests.cpp - #jsonschema/src/jsonschema_draft201909_tests.cpp + jsonschema/src/validation_report_tests.cpp + jsonschema/src/dynamic_ref_tests.cpp + jsonschema/src/jsonschema_defaults_tests.cpp + jsonschema/src/jsonschema_draft4_tests.cpp + jsonschema/src/jsonschema_draft6_tests.cpp + jsonschema/src/jsonschema_draft7_tests.cpp + jsonschema/src/jsonschema_draft201909_tests.cpp jsonschema/src/jsonschema_draft202012_tests.cpp - #jsonschema/src/schema_version_tests.cpp - #msgpack/src/decode_msgpack_tests.cpp - #msgpack/src/encode_msgpack_tests.cpp - #msgpack/src/msgpack_bitset_traits_tests.cpp - #msgpack/src/msgpack_cursor_tests.cpp - #msgpack/src/msgpack_event_reader_tests.cpp - #msgpack/src/msgpack_encoder_tests.cpp - #msgpack/src/msgpack_tests.cpp - #msgpack/src/msgpack_timestamp_tests.cpp - #corelib/src/bigint_tests.cpp - #corelib/src/source_adaptor_tests.cpp - #corelib/src/byte_string_tests.cpp - #corelib/src/value_converter_tests.cpp - #corelib/src/decode_traits_tests.cpp - #corelib/src/detail/optional_tests.cpp - #corelib/src/detail/span_tests.cpp - #corelib/src/detail/string_view_tests.cpp - #corelib/src/detail/heap_string_tests.cpp - #corelib/src/detail/to_integer_tests.cpp - #corelib/src/double_round_trip_tests.cpp - #corelib/src/double_to_string_tests.cpp - #corelib/src/dtoa_tests.cpp - #corelib/src/encode_decode_json_tests.cpp - #corelib/src/encode_traits_tests.cpp - #corelib/src/error_recovery_tests.cpp + jsonschema/src/schema_version_tests.cpp + msgpack/src/decode_msgpack_tests.cpp + msgpack/src/encode_msgpack_tests.cpp + msgpack/src/msgpack_bitset_traits_tests.cpp + msgpack/src/msgpack_cursor_tests.cpp + msgpack/src/msgpack_event_reader_tests.cpp + msgpack/src/msgpack_encoder_tests.cpp + msgpack/src/msgpack_tests.cpp + msgpack/src/msgpack_timestamp_tests.cpp + corelib/src/bigint_tests.cpp + corelib/src/source_adaptor_tests.cpp + corelib/src/byte_string_tests.cpp + corelib/src/value_converter_tests.cpp + corelib/src/decode_traits_tests.cpp + corelib/src/detail/optional_tests.cpp + corelib/src/detail/span_tests.cpp + corelib/src/detail/string_view_tests.cpp + corelib/src/detail/heap_string_tests.cpp + corelib/src/detail/to_integer_tests.cpp + corelib/src/double_round_trip_tests.cpp + corelib/src/double_to_string_tests.cpp + corelib/src/dtoa_tests.cpp + corelib/src/encode_decode_json_tests.cpp + corelib/src/encode_traits_tests.cpp + corelib/src/error_recovery_tests.cpp corelib/src/json_array_tests.cpp - #corelib/src/json_as_tests.cpp - #corelib/src/json_bitset_traits_tests.cpp - #corelib/src/json_checker_tests.cpp - #corelib/src/json_comparator_tests.cpp - #corelib/src/json_const_pointer_tests.cpp - #corelib/src/json_constructor_tests.cpp - #corelib/src/json_cursor_tests.cpp - #corelib/src/json_encoder_tests.cpp - #corelib/src/json_exception_tests.cpp - #corelib/src/json_filter_tests.cpp - #corelib/src/json_in_place_update_tests.cpp - #corelib/src/json_integer_tests.cpp - #corelib/src/json_less_tests.cpp - #corelib/src/json_line_split_tests.cpp - #corelib/src/json_literal_operator_tests.cpp + corelib/src/json_as_tests.cpp + corelib/src/json_bitset_traits_tests.cpp + corelib/src/json_checker_tests.cpp + corelib/src/json_comparator_tests.cpp + corelib/src/json_const_pointer_tests.cpp + corelib/src/json_constructor_tests.cpp + corelib/src/json_cursor_tests.cpp + corelib/src/json_encoder_tests.cpp + corelib/src/json_exception_tests.cpp + corelib/src/json_filter_tests.cpp + corelib/src/json_in_place_update_tests.cpp + corelib/src/json_integer_tests.cpp + corelib/src/json_less_tests.cpp + corelib/src/json_line_split_tests.cpp + corelib/src/json_literal_operator_tests.cpp corelib/src/json_object_tests.cpp - #corelib/src/ojson_object_tests.cpp - #corelib/src/json_options_tests.cpp - #corelib/src/json_parse_error_tests.cpp - #corelib/src/json_parser_position_tests.cpp - #corelib/src/json_parser_tests.cpp - #corelib/src/json_proxy_tests.cpp - #corelib/src/json_push_back_tests.cpp - #corelib/src/json_reader_exception_tests.cpp - #corelib/src/json_reader_tests.cpp - #corelib/src/json_storage_tests.cpp - #corelib/src/json_swap_tests.cpp - #corelib/src/json_traits_macro_functional_tests.cpp - #corelib/src/json_traits_macro_tests.cpp - #corelib/src/json_traits_macro_limit_tests.cpp - #corelib/src/json_traits_name_macro_tests.cpp - #corelib/src/json_type_traits_chrono_tests.cpp - #corelib/src/json_type_traits_container_tests.cpp - #corelib/src/json_type_traits_tests.cpp - #corelib/src/uri_tests.cpp - #corelib/src/json_validation_tests.cpp - #corelib/src/jsoncons_tests.cpp - #corelib/src/JSONTestSuite_tests.cpp - #corelib/src/ojson_tests.cpp - #corelib/src/parse_string_tests.cpp - #corelib/src/short_string_tests.cpp - #corelib/src/source_tests.cpp - #corelib/src/staj_iterator_tests.cpp - #corelib/src/extension_traits_tests.cpp - #corelib/src/polymorphic_allocator_tests.cpp - #corelib/src/scoped_allocator_adaptor_tests.cpp - #corelib/src/string_to_double_tests.cpp - #corelib/src/unicode_conv_tests.cpp - #corelib/src/wjson_tests.cpp - #ubjson/src/decode_ubjson_tests.cpp - #ubjson/src/encode_ubjson_tests.cpp - #ubjson/src/ubjson_cursor_tests.cpp - #ubjson/src/ubjson_encoder_tests.cpp + corelib/src/ojson_object_tests.cpp + corelib/src/json_options_tests.cpp + corelib/src/json_parse_error_tests.cpp + corelib/src/json_parser_position_tests.cpp + corelib/src/json_parser_tests.cpp + corelib/src/json_proxy_tests.cpp + corelib/src/json_push_back_tests.cpp + corelib/src/json_reader_exception_tests.cpp + corelib/src/json_reader_tests.cpp + corelib/src/json_storage_tests.cpp + corelib/src/json_swap_tests.cpp + corelib/src/json_traits_macro_functional_tests.cpp + corelib/src/json_traits_macro_tests.cpp + corelib/src/json_traits_macro_limit_tests.cpp + corelib/src/json_traits_name_macro_tests.cpp + corelib/src/json_type_traits_chrono_tests.cpp + corelib/src/json_type_traits_container_tests.cpp + corelib/src/json_type_traits_tests.cpp + corelib/src/uri_tests.cpp + corelib/src/json_validation_tests.cpp + corelib/src/jsoncons_tests.cpp + corelib/src/JSONTestSuite_tests.cpp + corelib/src/ojson_tests.cpp + corelib/src/parse_string_tests.cpp + corelib/src/short_string_tests.cpp + corelib/src/source_tests.cpp + corelib/src/staj_iterator_tests.cpp + corelib/src/extension_traits_tests.cpp + corelib/src/polymorphic_allocator_tests.cpp + corelib/src/scoped_allocator_adaptor_tests.cpp + corelib/src/string_to_double_tests.cpp + corelib/src/unicode_conv_tests.cpp + corelib/src/wjson_tests.cpp + ubjson/src/decode_ubjson_tests.cpp + ubjson/src/encode_ubjson_tests.cpp + ubjson/src/ubjson_cursor_tests.cpp + ubjson/src/ubjson_encoder_tests.cpp corelib/src/testmain.cpp ) From 1d45253e50752362ab6962b5408dba12a205df26 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 19:26:46 -0400 Subject: [PATCH 40/46] CMakeLists --- .github/workflows/ubuntu.yml | 46 ++++++++++++++++++++++++++++++++---- test/CMakeLists.txt | 2 +- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 8ad7def49..61b297b3d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -141,14 +141,31 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: ['8','9','10','11','12','latest'] + compiler: ['6','7','8','9','10','11','12','latest'] container: gcc:${{ matrix.compiler }} steps: - uses: actions/checkout@v3 - name: Get latest CMake and ninja uses: lukka/get-cmake@v3.27.7 - name: cmake - run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++17 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + - name: build + run: cmake --build build + - name: test + run: cd build ; ctest --output-on-failure + + ci_test_compilers_gcc: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: ['12','latest'] + container: gcc:${{ matrix.compiler }} + steps: + - uses: actions/checkout@v3 + - name: Get latest CMake and ninja + uses: lukka/get-cmake@v3.27.7 + - name: cmake + run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - name: build run: cmake --build build - name: test @@ -159,7 +176,28 @@ jobs: strategy: matrix: # compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15-bullseye', 'latest'] - compiler: ['3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '15-bullseye'] + compiler: ['3.9', '4', '5', '6', '7','8','9', '10', '11', '12', '13', '14', '15-bullseye'] + container: silkeh/clang:${{ matrix.compiler }} + steps: + - name: Install unzip and git + run: apt-get update ; apt-get install -y unzip git + - uses: actions/checkout@v3 + - name: Get latest CMake and ninja + uses: lukka/get-cmake@v3.27.7 + - name: cmake + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DJSONCONS_BUILD_TESTS=On + - name: build + working-directory: build/ + run: cmake --build . + - name: test + working-directory: build/ + run: ctest --output-on-failure + + ci_test_compilers_clang: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: ['13', '15-bullseye'] container: silkeh/clang:${{ matrix.compiler }} steps: - name: Install unzip and git @@ -168,7 +206,7 @@ jobs: - name: Get latest CMake and ninja uses: lukka/get-cmake@v3.27.7 - name: cmake - run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DLLVM_CXX_STD=c++11 -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On + run: cmake -S . -B build -DJSONCONS_SANITIZE=ON -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On - name: build working-directory: build/ run: cmake --build . diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 09754f3f7..de875694e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -98,7 +98,7 @@ add_executable(unit_tests jsonpath/src/jsonpath_stateful_allocator_tests.cpp jsonpointer/src/jsonpointer_flatten_tests.cpp jsonpointer/src/jsonpointer_tests.cpp - sonschema/src/abort_early_tests.cpp + jsonschema/src/abort_early_tests.cpp jsonschema/src/json_schema_walk_tests.cpp jsonschema/src/format_validator_tests.cpp jsonschema/src/validation_report_tests.cpp From a74b62398fabbbe16e422c508877f411138fd6de Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 21:03:39 -0400 Subject: [PATCH 41/46] Compiler support --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f92143832..7c9fc3488 100644 --- a/README.md +++ b/README.md @@ -723,17 +723,16 @@ jsoncons requires a compiler with C++11 support. It is tested in continuous inte [UndefinedBehaviorSanitizer (UBSan)](http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) diagnostics are enabled for selected gcc and clang builds. Since v0.151.0, it is integrated with [Google OSS-fuzz](https://github.com/google/oss-fuzz), with coverage for all parsers and encoders. -| Compiler | Version |Architecture | Operating System | Notes | -|-------------------------|---------------------------|-------------|-------------------|-------| -| Microsoft Visual Studio | vs2015 (MSVC 19.0.24241.7)| x86,x64 | Windows 10 | | -| | vs2017 | x86,x64 | Windows 10 | | -| | vs2019 | x86,x64 | Windows 10 | | -| g++ | 4.8 and above | x64 | Ubuntu |`std::regex` isn't fully implemented in 4.8, so `jsoncons::jsonpath` regular expression filters aren't supported in 4.8 | -| | 4.8.5 | x64 | CentOS 7.6 |`std::regex` isn't fully implemented in 4.8, so `jsoncons::jsonpath` regular expression filters aren't supported in 4.8 | -| | 6.3.1 (Red Hat 6.3.1-1) | x64 | Fedora release 24 | | -| | 4.9.2 | i386 | Debian 8 | | -| clang | 4.0, 5.0, 6.0, 7, 8, 9, 10| x64 | Ubuntu | | -| clang xcode | 9.3, 9.4, 10, 10.1, 10.2, 11.2, 12 | x64 | OSX | | +| Compiler | Version | Architecture | Operating System | CI Service | +|-------------------------|------------------------------------|--------------|------------------|----------------| +| Visual Studio | vs2019 | x64 | Windows 10 | GitHub Actions | +| | vs2022 | x64 | Windows 10 | | +| Visual Studio - clang | vs2019 | x64 | Windows 10 | GitHub Actions | +| | vs2022 | x64 | Windows 10 | | +| g++ | 10, 11 | x64 | Ubuntu | GitHub Actions | +| g++ | 6 - 12 | x64 | Ubuntu | circleci | +| clang | 3.9, 4 - 15 | x64 | Ubuntu | circleci | +| clang xcode | | x64 | OSX | GitHub Actions | ## Building the test suite and examples with CMake From 842396eec85c77ac3cf74543554c661efb9a9d3b Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 21:07:00 -0400 Subject: [PATCH 42/46] Compiler support --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c9fc3488..1a46fe95c 100644 --- a/README.md +++ b/README.md @@ -719,7 +719,7 @@ string_value: 1.23456789012345678901234567890 (bigdec) ## Supported compilers -jsoncons requires a compiler with C++11 support. It is tested in continuous integration on [Github Actions](https://github.com/danielaparker/jsoncons/actions), [AppVeyor](https://ci.appveyor.com/project/danielaparker/jsoncons), [Travis](https://travis-ci.org/danielaparker/jsoncons), and [doozer](https://doozer.io/). +jsoncons requires a compiler with minimally C++11 support. It is tested in continuous integration on [Github Actions](https://github.com/danielaparker/jsoncons/actions) and [circleci](https://app.circleci.com/pipelines/circleci/EFpnYcrBiZEvYvns3VF4vT). [UndefinedBehaviorSanitizer (UBSan)](http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) diagnostics are enabled for selected gcc and clang builds. Since v0.151.0, it is integrated with [Google OSS-fuzz](https://github.com/google/oss-fuzz), with coverage for all parsers and encoders. From 0b83cc9bea27fdf8c19538b2e535d6dc9f692836 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 21:16:23 -0400 Subject: [PATCH 43/46] Compiler support --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1a46fe95c..2e0c0c37c 100644 --- a/README.md +++ b/README.md @@ -730,8 +730,8 @@ Since v0.151.0, it is integrated with [Google OSS-fuzz](https://github.com/googl | Visual Studio - clang | vs2019 | x64 | Windows 10 | GitHub Actions | | | vs2022 | x64 | Windows 10 | | | g++ | 10, 11 | x64 | Ubuntu | GitHub Actions | -| g++ | 6 - 12 | x64 | Ubuntu | circleci | -| clang | 3.9, 4 - 15 | x64 | Ubuntu | circleci | +| g++ | 6, 7, 8, 9, 10, 11, 12 | x64 | Ubuntu | circleci | +| clang | 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | x64 | Ubuntu | circleci | | clang xcode | | x64 | OSX | GitHub Actions | ## Building the test suite and examples with CMake From 525f4d361c28d997d65da321e16e519b85da3ff8 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 21:19:06 -0400 Subject: [PATCH 44/46] Compiler support --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e0c0c37c..5e89ff13d 100644 --- a/README.md +++ b/README.md @@ -726,9 +726,9 @@ Since v0.151.0, it is integrated with [Google OSS-fuzz](https://github.com/googl | Compiler | Version | Architecture | Operating System | CI Service | |-------------------------|------------------------------------|--------------|------------------|----------------| | Visual Studio | vs2019 | x64 | Windows 10 | GitHub Actions | -| | vs2022 | x64 | Windows 10 | | +| | vs2022 | x64 | Windows 10 | GitHub Actions | | Visual Studio - clang | vs2019 | x64 | Windows 10 | GitHub Actions | -| | vs2022 | x64 | Windows 10 | | +| | vs2022 | x64 | Windows 10 | GitHub Actions | | g++ | 10, 11 | x64 | Ubuntu | GitHub Actions | | g++ | 6, 7, 8, 9, 10, 11, 12 | x64 | Ubuntu | circleci | | clang | 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | x64 | Ubuntu | circleci | From 828cce28ac1d884a360c6d07a4beb85a5a203a3d Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 21:36:38 -0400 Subject: [PATCH 45/46] Compiler support --- .github/workflows/windows.yml | 4 ++++ README.md | 21 +++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index dd25ec237..5683d8adc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -16,6 +16,7 @@ jobs: fail-fast: false matrix: build_type: [Debug, Release] + architecture: [x64, x86] runs-on: windows-latest @@ -41,6 +42,7 @@ jobs: fail-fast: false matrix: build_type: [Debug, Release] + architecture: [x64, x86] runs-on: windows-latest @@ -66,6 +68,7 @@ jobs: fail-fast: false matrix: build_type: [Debug, Release] + architecture: [x64, x86] runs-on: windows-2019 @@ -91,6 +94,7 @@ jobs: fail-fast: false matrix: build_type: [Debug, Release] + architecture: [x64, x86] runs-on: windows-2019 diff --git a/README.md b/README.md index 5e89ff13d..f18bca675 100644 --- a/README.md +++ b/README.md @@ -723,16 +723,17 @@ jsoncons requires a compiler with minimally C++11 support. It is tested in conti [UndefinedBehaviorSanitizer (UBSan)](http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) diagnostics are enabled for selected gcc and clang builds. Since v0.151.0, it is integrated with [Google OSS-fuzz](https://github.com/google/oss-fuzz), with coverage for all parsers and encoders. -| Compiler | Version | Architecture | Operating System | CI Service | -|-------------------------|------------------------------------|--------------|------------------|----------------| -| Visual Studio | vs2019 | x64 | Windows 10 | GitHub Actions | -| | vs2022 | x64 | Windows 10 | GitHub Actions | -| Visual Studio - clang | vs2019 | x64 | Windows 10 | GitHub Actions | -| | vs2022 | x64 | Windows 10 | GitHub Actions | -| g++ | 10, 11 | x64 | Ubuntu | GitHub Actions | -| g++ | 6, 7, 8, 9, 10, 11, 12 | x64 | Ubuntu | circleci | -| clang | 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | x64 | Ubuntu | circleci | -| clang xcode | | x64 | OSX | GitHub Actions | +| Compiler | Version | Standard | Architecture | Operating System | CI Service | +|-------------------------|------------------------------------|--------------|--------------|------------------|----------------| +| Visual Studio | vs2019 | default | x86, x64 | Windows 10 | GitHub Actions | +| | vs2022 | default | x86, x64 | Windows 10 | GitHub Actions | +| Visual Studio - clang | vs2019 | default | x86, x64 | Windows 10 | GitHub Actions | +| | vs2022 | default | x86, x64 | Windows 10 | GitHub Actions | +| g++ | 10, 11 | c++17 | x64 | Ubuntu | GitHub Actions | +| clang | 13, 14 | default | x64 | Ubuntu | GitHub Actions | +| g++ | 6, 7, 8, 9, 10, 11, 12 | default | x64 | Ubuntu | circleci | +| clang | 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | default | x64 | Ubuntu | circleci | +| clang xcode | | c++17 | x64 | OSX | GitHub Actions | ## Building the test suite and examples with CMake From ba201644ddd33336c24428c9e19e2eabf86a398c Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Wed, 22 May 2024 21:41:51 -0400 Subject: [PATCH 46/46] Compiler support --- .github/workflows/ubuntu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 61b297b3d..097b8ae9c 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -154,7 +154,7 @@ jobs: - name: test run: cd build ; ctest --output-on-failure - ci_test_compilers_gcc: + ci_test_compilers_gcc2: runs-on: ubuntu-latest strategy: matrix: @@ -193,7 +193,7 @@ jobs: working-directory: build/ run: ctest --output-on-failure - ci_test_compilers_clang: + ci_test_compilers_clang2: runs-on: ubuntu-latest strategy: matrix: