diff --git a/.github/workflows/clang-c++23.yml b/.github/workflows/clang-c++23.yml new file mode 100644 index 00000000..82c4a16d --- /dev/null +++ b/.github/workflows/clang-c++23.yml @@ -0,0 +1,184 @@ +name: clang-c++23 +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, pull-request/* ] + +jobs: + + build-clang-cpp23-linux-no-stl: + name: Clang C++23 Linux - No STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + # Temporary fix. See https://github.com/actions/runner-images/issues/8659 + - name: Install newer Clang + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x ./llvm.sh + sudo ./llvm.sh 17 + + - name: Build + run: | + export CC=clang-17 + export CXX=clang++-17 + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + clang-17 --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-clang-cpp23-linux-stl-force-cpp03: + name: Clang C++23 Linux - STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + # Temporary fix. See https://github.com/actions/runner-images/issues/8659 + - name: Install newer Clang + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x ./llvm.sh + sudo ./llvm.sh 17 + + - name: Build + run: | + export CC=clang-17 + export CXX=clang++-17 + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + clang-17 --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-clang-cpp2-linux-no-stl-force-cpp03: + name: Clang C++23 Linux - No STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + # Temporary fix. See https://github.com/actions/runner-images/issues/8659 + - name: Install newer Clang + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x ./llvm.sh + sudo ./llvm.sh 17 + + - name: Build + run: | + export CC=clang-17 + export CXX=clang++-17 + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + clang-17 --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-clang-cpp23-osx-stl: + name: Clang C++23 OSX - STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-13] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-clang-cpp23-osx-no-stl: + name: Clang C++23 OSX - No STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-13] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-clang-cpp23-osx-stl-force-cpp03: + name: Clang C++23 OSX - STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-13] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-clang-cpp23-osx-no-stl-force-cpp03: + name: Clang C++23 OSX - No STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-13] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + diff --git a/.github/workflows/clang-syntax-checks.yml b/.github/workflows/clang-syntax-checks.yml index 2baf9ef2..c0c5f4e2 100644 --- a/.github/workflows/clang-syntax-checks.yml +++ b/.github/workflows/clang-syntax-checks.yml @@ -20,7 +20,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -38,7 +38,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -56,7 +56,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -74,7 +74,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -92,7 +92,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -110,7 +110,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -128,7 +128,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -146,7 +146,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -164,7 +164,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -182,7 +182,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -200,7 +200,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -218,7 +218,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -236,7 +236,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -254,7 +254,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -272,7 +272,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -290,7 +290,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -308,7 +308,7 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) @@ -326,6 +326,78 @@ jobs: run: | export CC=clang export CXX=clang++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-clang-cpp23-linux-STL: + name: Syntax Check - Clang C++23 Linux STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-clang-cpp23-linux-No-STL: + name: Syntax Check - Clang C++23 Linux No STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-clang-cpp23-linux-STL-Force-CPP03: + name: Syntax Check - Clang C++23 Linux STL Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check + clang --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-clang-cpp23-linux-No-STL-Force-CPP03: + name: Syntax Check - Clang C++23 Linux No STL Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check clang --version make -j $(getconf _NPROCESSORS_ONLN) diff --git a/.github/workflows/gcc-c++23.yml b/.github/workflows/gcc-c++23.yml new file mode 100644 index 00000000..93881f84 --- /dev/null +++ b/.github/workflows/gcc-c++23.yml @@ -0,0 +1,96 @@ +name: gcc-c++23 +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, pull-request/* ] + +jobs: + + build-gcc-cpp23-linux-stl: + name: GCC C++23 Linux - STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + export CC=gcc + export CXX=g++ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-gcc-cpp23-linux-no-stl: + name: GCC C++23 Linux - No STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + export CC=gcc + export CXX=g++ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-gcc-cpp23-linux-stl-force-cpp03: + name: GCC C++23 Linux - STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + export CC=gcc + export CXX=g++ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests + + build-gcc-cpp23-linux-no-stl-force-cpp03: + name: GCC C++23 Linux - No STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + export CC=gcc + export CXX=g++ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + - name: Run tests + run: ./test/etl_tests \ No newline at end of file diff --git a/.github/workflows/gcc-syntax-checks.yml b/.github/workflows/gcc-syntax-checks.yml index 75bcafa3..106d6d3b 100644 --- a/.github/workflows/gcc-syntax-checks.yml +++ b/.github/workflows/gcc-syntax-checks.yml @@ -20,7 +20,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -38,7 +38,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -56,7 +56,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -74,7 +74,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -92,7 +92,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -110,7 +110,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -128,7 +128,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -146,7 +146,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -164,7 +164,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -182,7 +182,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -200,7 +200,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -218,7 +218,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -236,7 +236,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -254,7 +254,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -272,7 +272,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -290,7 +290,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -308,7 +308,7 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) @@ -326,6 +326,78 @@ jobs: run: | export CC=gcc export CXX=g++ - cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON ./test/syntax_check + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-gcc-cpp23-linux-STL: + name: Syntax Check - GCC C++23 Linux STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=gcc + export CXX=g++ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-gcc-cpp23-linux-No-STL: + name: Syntax Check - GCC C++23 Linux No STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=gcc + export CXX=g++ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-gcc-cpp23-linux-STL-Force-CPP03: + name: Syntax Check - GCC C++23 Linux STL Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=gcc + export CXX=g++ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check + gcc --version + make -j $(getconf _NPROCESSORS_ONLN) + + build-gcc-cpp23-linux-No-STL-Force-CPP03: + name: Syntax Check - GCC C++23 Linux No STL Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=gcc + export CXX=g++ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check gcc --version make -j $(getconf _NPROCESSORS_ONLN) \ No newline at end of file diff --git a/README.md b/README.md index 50c564c7..b237c5e8 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,14 @@ Embedded Template Library (ETL) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++14.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++17.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++20.yml/badge.svg?branch=master) +![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++23.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-syntax-checks.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++11.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++14.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++17.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++20.yml/badge.svg?branch=master) +![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++23.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-syntax-checks.yml/badge.svg?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3c14cd918ccf40008d0bcd7b083d5946)](https://www.codacy.com/manual/jwellbelove/etl?utm_source=github.com&utm_medium=referral&utm_content=ETLCPP/etl&utm_campaign=Badge_Grade) @@ -44,13 +46,13 @@ The ETL is not designed to completely replace the STL, but complement it. Its design objective covers three areas. - Create a set of containers where the size or maximum size is determined at compile time. These containers are direct equivalents of those supplied in the STL. -- Be compatible with C++ 03 but implement as many of the C++ 11/14/17/20 additions as possible. +- Be compatible with C++ 03 but implement as many of the C++ 11/14/17/20/23 additions as possible. - Add other useful components that are not present in the standard library. The embedded template library has been designed for lower resource embedded applications. It contains a set of containers, algorithms and utilities, some of which emulate parts of the STL. There is no dynamic memory allocation. The library makes no use of the heap. All of the containers have a fixed capacity allowing all memory allocation to be determined at compile time. -The library is intended for any compiler that supports C++98/03/11/14/17/20. +The library is intended for any compiler that supports C++98/03/11/14/17/20/23. ## Main features diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f8866656..7ea64825 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -324,20 +324,23 @@ if (ETL_CXX_STANDARD MATCHES "98") message(STATUS "Compiling for C++98") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98) elseif (ETL_CXX_STANDARD MATCHES "03") - message(STATUS "Compiling for C++03 (C++98)") + message(STATUS "Compiling for C++03 (C++98)") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 98) elseif (ETL_CXX_STANDARD MATCHES "11") - message(STATUS "Compiling for C++11") + message(STATUS "Compiling for C++11") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 11) elseif (ETL_CXX_STANDARD MATCHES "14") - message(STATUS "Compiling for C++14") + message(STATUS "Compiling for C++14") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14) elseif (ETL_CXX_STANDARD MATCHES "17") - message(STATUS "Compiling for C++17") + message(STATUS "Compiling for C++17") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17) -else() +elseif (ETL_CXX_STANDARD MATCHES "20") message(STATUS "Compiling for C++20") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20) +else() + message(STATUS "Compiling for C++23") + set_property(TARGET etl_tests PROPERTY CXX_STANDARD 23) endif() if (NO_STL OR ETL_NO_STL) diff --git a/test/etl_error_handler/assert_function/CMakeLists.txt b/test/etl_error_handler/assert_function/CMakeLists.txt index e996a4e3..06430b68 100644 --- a/test/etl_error_handler/assert_function/CMakeLists.txt +++ b/test/etl_error_handler/assert_function/CMakeLists.txt @@ -31,9 +31,12 @@ elseif (ETL_CXX_STANDARD MATCHES "14") elseif (ETL_CXX_STANDARD MATCHES "17") message(STATUS "Compiling for C++17") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17) -else() +elseif (ETL_CXX_STANDARD MATCHES "20") message(STATUS "Compiling for C++20") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20) +else() + message(STATUS "Compiling for C++23") + set_property(TARGET etl_tests PROPERTY CXX_STANDARD 23) endif() if (ETL_OPTIMISATION MATCHES "-O1") diff --git a/test/etl_error_handler/exceptions/CMakeLists.txt b/test/etl_error_handler/exceptions/CMakeLists.txt index fcbbdc48..4aef8c76 100644 --- a/test/etl_error_handler/exceptions/CMakeLists.txt +++ b/test/etl_error_handler/exceptions/CMakeLists.txt @@ -29,9 +29,12 @@ elseif (ETL_CXX_STANDARD MATCHES "14") elseif (ETL_CXX_STANDARD MATCHES "17") message(STATUS "Compiling for C++17") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17) -else() +elseif (ETL_CXX_STANDARD MATCHES "20") message(STATUS "Compiling for C++20") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20) +else() + message(STATUS "Compiling for C++23") + set_property(TARGET etl_tests PROPERTY CXX_STANDARD 23) endif() if (ETL_OPTIMISATION MATCHES "-O1") diff --git a/test/etl_error_handler/log_errors/CMakeLists.txt b/test/etl_error_handler/log_errors/CMakeLists.txt index b76f17bb..6860a419 100644 --- a/test/etl_error_handler/log_errors/CMakeLists.txt +++ b/test/etl_error_handler/log_errors/CMakeLists.txt @@ -27,11 +27,14 @@ elseif (ETL_CXX_STANDARD MATCHES "14") message(STATUS "Compiling for C++14") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14) elseif (ETL_CXX_STANDARD MATCHES "17") - message(STATUS "Compiling for C++17") + message(STATUS "Compiling for C++17") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17) -else() +elseif (ETL_CXX_STANDARD MATCHES "20") message(STATUS "Compiling for C++20") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20) +else() + message(STATUS "Compiling for C++23") + set_property(TARGET etl_tests PROPERTY CXX_STANDARD 23) endif() if (ETL_OPTIMISATION MATCHES "-O1") diff --git a/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt b/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt index a043c9c2..8d08df63 100644 --- a/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt +++ b/test/etl_error_handler/log_errors_and_exceptions/CMakeLists.txt @@ -28,11 +28,14 @@ elseif (ETL_CXX_STANDARD MATCHES "14") message(STATUS "Compiling for C++14") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14) elseif (ETL_CXX_STANDARD MATCHES "17") - message(STATUS "Compiling for C++17") + message(STATUS "Compiling for C++17") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17) -else() +elseif (ETL_CXX_STANDARD MATCHES "20") message(STATUS "Compiling for C++20") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20) +else() + message(STATUS "Compiling for C++23") + set_property(TARGET etl_tests PROPERTY CXX_STANDARD 23) endif() if (ETL_OPTIMISATION MATCHES "-O1") diff --git a/test/etl_initializer_list/CMakeLists.txt b/test/etl_initializer_list/CMakeLists.txt index 647b590a..e9230ce1 100644 --- a/test/etl_initializer_list/CMakeLists.txt +++ b/test/etl_initializer_list/CMakeLists.txt @@ -43,11 +43,14 @@ elseif (ETL_CXX_STANDARD MATCHES "14") message(STATUS "Compiling for C++14") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 14) elseif (ETL_CXX_STANDARD MATCHES "17") - message(STATUS "Compiling for C++17") + message(STATUS "Compiling for C++17") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17) -else() +elseif (ETL_CXX_STANDARD MATCHES "20") message(STATUS "Compiling for C++20") set_property(TARGET etl_tests PROPERTY CXX_STANDARD 20) +else() + message(STATUS "Compiling for C++23") + set_property(TARGET etl_tests PROPERTY CXX_STANDARD 23) endif() target_include_directories(etl_tests diff --git a/test/run-syntax-checks.sh b/test/run-syntax-checks.sh index 92efb1b9..7d66ae10 100644 --- a/test/run-syntax-checks.sh +++ b/test/run-syntax-checks.sh @@ -46,7 +46,7 @@ PrintHelp() echo "$HelpColour" echo "----------------------------------------------------------------------------------" echo " Syntax : ./runtests.sh " - echo " C++ Standard : a, 03, 11, 14, 17 or 20 (a = All standards) " + echo " C++ Standard : a, 03, 11, 14, 17, 20 or 23 (a = All standards) " echo " Threads : Number of threads to use. Default = 4 " echo " Compiler select : gcc or clang. Default All compilers " echo "----------------------------------------------------------------------------------" @@ -98,6 +98,8 @@ elif [ "$1" = "17" ]; then requested_cxx_standard="17" elif [ "$1" = "20" ]; then requested_cxx_standard="20" +elif [ "$1" = "23" ]; then + requested_cxx_standard="23" elif [ "$1" = "A" ]; then requested_cxx_standard="All" elif [ "$1" = "a" ]; then @@ -1291,4 +1293,248 @@ fi fi +############################################################################### +if [ "$requested_cxx_standard" = "23" ] || [ "$requested_cxx_standard" = "All" ]; then +SetCxxStandard "23" + +if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "STL" +compiler=$gcc_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=gcc CXX=g++ cmake -E chdir bgcc cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "STL - Force C++03" +compiler=$gcc_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=gcc CXX=g++ cmake -E chdir bgcc cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "No STL" +compiler=$gcc_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=gcc CXX=g++ cmake -E chdir bgcc cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "No STL - Force C++03" +compiler=$gcc_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=gcc CXX=g++ cmake -E chdir bgcc cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +#if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then +#SetConfigurationName "No STL - User defined traits" +#compiler=$gcc_compiler +#PrintHeader +#rm -rdf bgcc +#rm -rdf bclang +#cmake -E make_directory bgcc bclang +#CC=gcc CXX=g++ cmake -E chdir bgcc cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=ON -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +#cmake --build bgcc +#if [ $? -eq 0 ]; then +# PassedCompilation +#else +# FailedCompilation +# exit $? +#fi +#fi + +if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "STL - Built-in traits" +compiler=$gcc_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=gcc CXX=g++ cmake -E chdir bgcc cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "No STL - Built-in traits" +compiler=$gcc_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=gcc CXX=g++ cmake -E chdir bgcc cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "STL" +compiler=$clang_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=clang CXX=clang++ cmake -E chdir bclang cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bclang +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "STL - Force C++03" +compiler=$clang_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=clang CXX=clang++ cmake -E chdir bclang cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bclang +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "No STL" +compiler=$clang_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=clang CXX=clang++ cmake -E chdir bclang cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bclang +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "No STL - Force C++03" +compiler=$clang_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=clang CXX=clang++ cmake -E chdir bclang cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bclang +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +#if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then +#SetConfigurationName "No STL - User defined traits" +#compiler=$clang_compiler +#PrintHeader +#rm -rdf bgcc +#rm -rdf bclang +#cmake -E make_directory bgcc bclang +#CC=clang CXX=clang++ cmake -E chdir bclang cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=ON -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +#cmake --build bclang +#if [ $? -eq 0 ]; then +# PassedCompilation +#else +# FailedCompilation +# exit $? +#fi +#fi + +if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "STL - Built-in traits" +compiler=$clang_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=clang CXX=clang++ cmake -E chdir bgcc cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then +SetConfigurationName "No STL - Built-in traits" +compiler=$clang_compiler +PrintHeader +rm -rdf bgcc +rm -rdf bclang +cmake -E make_directory bgcc bclang +CC=clang CXX=clang++ cmake -E chdir bgcc cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=ON -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=$cxx_standard .. +cmake --build bgcc +if [ $? -eq 0 ]; then + PassedCompilation +else + FailedCompilation + exit $? +fi +fi + +fi + ChecksCompleted diff --git a/test/run-tests.sh b/test/run-tests.sh index fbd01519..9d87d930 100644 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -41,7 +41,7 @@ PrintHeader() echo " Configuration : $configuration_name" | tee -a log.txt echo " Compiler : $compiler " | tee -a log.txt echo " Language : C++$cxx_standard " | tee -a log.txt - echo " Optimisation : $opt " | tee -a log.txt + echo " Optimisation : $opt " | tee -a log.txt echo " Sanitizer : $sanitize " | tee -a log.txt echo " Compiler select : $compiler_enabled " | tee -a log.txt echo " ETL version : $etl_version " | tee -a log.txt @@ -54,14 +54,14 @@ PrintHeader() PrintHelp() { echo "$HelpColour" - echo "--------------------------------------------------------------------------------------------" - echo " Syntax : ./runtests.sh " - echo " C++ Standard : 11, 14, 17 or 20 " - echo " Optimisation : 0, 1, 2 or 3. Default = 0 " - echo " Threads : Number of threads to use. Default = 4 " - echo " Sanitizer : s enables sanitizer checks, n disables. Default disabled " - echo " Compiler : gcc or clang. Default All compilers " - echo "--------------------------------------------------------------------------------------------" + echo "-------------------------------------------------------------------------------------" + echo " Syntax : ./runtests.sh " + echo " C++ Standard : 11, 14, 17, 20 or 23 " + echo " Optimisation : 0, 1, 2 or 3. Default = 0 " + echo " Threads : Number of threads to use. Default = 4 " + echo " Sanitizer : s enables sanitizer checks, n disables. Default disabled " + echo " Compiler select : gcc or clang. Default All compilers " + echo "-------------------------------------------------------------------------------------" echo "$NoColour" } @@ -123,6 +123,8 @@ elif [ "$1" = "17" ]; then cxx_standard="17" elif [ "$1" = "20" ]; then cxx_standard="20" +elif [ "$1" = "23" ]; then + cxx_standard="23" else PrintHelp exit diff --git a/test/syntax_check/CMakeLists.txt b/test/syntax_check/CMakeLists.txt index 5eeb8ee2..3f58aad4 100644 --- a/test/syntax_check/CMakeLists.txt +++ b/test/syntax_check/CMakeLists.txt @@ -44,20 +44,23 @@ if (ETL_CXX_STANDARD MATCHES "98") message(STATUS "Compiling for C++98") set_property(TARGET tests PROPERTY CXX_STANDARD 98) elseif (ETL_CXX_STANDARD MATCHES "03") - message(STATUS "Compiling for C++03 (C++98)") + message(STATUS "Compiling for C++03 (C++98)") set_property(TARGET tests PROPERTY CXX_STANDARD 98) elseif (ETL_CXX_STANDARD MATCHES "11") - message(STATUS "Compiling for C++11") + message(STATUS "Compiling for C++11") set_property(TARGET tests PROPERTY CXX_STANDARD 11) elseif (ETL_CXX_STANDARD MATCHES "14") - message(STATUS "Compiling for C++14") + message(STATUS "Compiling for C++14") set_property(TARGET tests PROPERTY CXX_STANDARD 14) elseif (ETL_CXX_STANDARD MATCHES "17") - message(STATUS "Compiling for C++17") + message(STATUS "Compiling for C++17") set_property(TARGET tests PROPERTY CXX_STANDARD 17) -else() +elseif (ETL_CXX_STANDARD MATCHES "20") message(STATUS "Compiling for C++20") set_property(TARGET tests PROPERTY CXX_STANDARD 20) +else() + message(STATUS "Compiling for C++23") + set_property(TARGET tests PROPERTY CXX_STANDARD 23) endif() target_sources(tests PRIVATE diff --git a/test/test_mem_cast_ptr.cpp b/test/test_mem_cast_ptr.cpp index e22c4322..90ce4930 100644 --- a/test/test_mem_cast_ptr.cpp +++ b/test/test_mem_cast_ptr.cpp @@ -30,6 +30,7 @@ SOFTWARE. #include "etl/mem_cast.h" #include "etl/largest.h" +#include "etl/alignment.h" #include #include @@ -72,7 +73,7 @@ namespace return reinterpret_cast(uintptr_t(i)); } - typename std::aligned_storage::type buffer; + typename etl::aligned_storage::type buffer; SUITE(test_mem_cast_ptr) { diff --git a/test/test_murmur3.cpp b/test/test_murmur3.cpp index c8dc0d81..c999033f 100644 --- a/test/test_murmur3.cpp +++ b/test/test_murmur3.cpp @@ -37,6 +37,8 @@ SOFTWARE. #include "etl/murmur3.h" +#include "etl/alignment.h" + namespace { SUITE(test_murmur3) @@ -44,7 +46,7 @@ namespace //************************************************************************* TEST(test_murmur3_32_constructor) { - typename std::aligned_storage::value>::type storage[10]; + typename etl::aligned_storage::value>::type storage[10]; std::string data("123456789"); char* begin = (char*)&storage[0]; @@ -61,7 +63,7 @@ namespace //************************************************************************* TEST(test_murmur3_32_add_values) { - typename std::aligned_storage::value>::type storage[10]; + typename etl::aligned_storage::value>::type storage[10]; std::string data("123456789"); char* begin = (char*)&storage[0]; @@ -85,7 +87,7 @@ namespace //************************************************************************* TEST(test_murmur3_32_add_range) { - typename std::aligned_storage::value>::type storage[10]; + typename etl::aligned_storage::value>::type storage[10]; std::string data("123456789"); char* begin = (char*)&storage[0];