⚗️ add C++20 build

pull/2550/head
Niels Lohmann 2020-12-29 20:45:56 +01:00
parent 77be4f6aaf
commit e4fc598466
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 1 additions and 21 deletions

View File

@ -43,26 +43,6 @@ jobs:
- name: test
run: cd build ; ctest -j 10 --output-on-failure
gcc_build_cxx20:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install_gcc
run: |
sudo apt update
sudo apt install gcc-10 g++-10
shell: bash
- name: cmake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
env:
CC: gcc-10
CXX: g++-10
- name: build
run: cmake --build build --parallel 10
- name: test
run: cd build ; ctest -j 10 --output-on-failure
clang_build_cxx20:
runs-on: ubuntu-latest

View File

@ -495,7 +495,7 @@ TEST_CASE("regression tests 2")
const char DATA[] = R"("Hello, world!")";
const auto s = std::as_bytes(std::span(DATA));
json j = json::parse(s);
CHECK(j.dump == "Hello, world!");
CHECK(j.dump() == "Hello, world!");
}
#endif
}