mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-28 18:07:10 +08:00
Merge branch 'master' into const_map_is_valid
This commit is contained in:
commit
d2ab539b85
@ -5,7 +5,7 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:18-bullseye",
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:18",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:19-bullseye",
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:19",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:20-bullseye",
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:20",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:21-bullseye",
|
||||
"BASE_IMAGE_NAME": "silkeh/clang:21",
|
||||
"DEBIAN_SNAPSHOT": "none"
|
||||
},
|
||||
"context": "../context"
|
||||
|
||||
0
.devcontainer/context/.gitkeep
Normal file
0
.devcontainer/context/.gitkeep
Normal file
34
.github/workflows/bazel-gcc-c++23-no-stl.yml
vendored
34
.github/workflows/bazel-gcc-c++23-no-stl.yml
vendored
@ -2,9 +2,37 @@ name: bazel-gcc-c++23-no-stl
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,10 +41,10 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: bazel build //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL
|
||||
run: bazel build //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL --//:etl_profile=//:no_profile
|
||||
|
||||
- name: Run tests
|
||||
run: bazel test //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL --test_output=all
|
||||
run: bazel test //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL --//:etl_profile=//:no_profile --test_output=all
|
||||
|
||||
39
.github/workflows/clang-c++11.yml
vendored
39
.github/workflows/clang-c++11.yml
vendored
@ -2,9 +2,37 @@ name: clang-c++11
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,13 +44,12 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -38,7 +65,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install libc++
|
||||
run: |
|
||||
@ -51,7 +78,6 @@ jobs:
|
||||
export CXX=clang++
|
||||
export CXXFLAGS="-stdlib=libc++"
|
||||
export LDFLAGS="-stdlib=libc++"
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -67,16 +93,15 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
39
.github/workflows/clang-c++14.yml
vendored
39
.github/workflows/clang-c++14.yml
vendored
@ -2,9 +2,37 @@ name: clang-c++14
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,13 +44,12 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -38,7 +65,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install libc++
|
||||
run: |
|
||||
@ -51,7 +78,6 @@ jobs:
|
||||
export CXX=clang++
|
||||
export CXXFLAGS="-stdlib=libc++"
|
||||
export LDFLAGS="-stdlib=libc++"
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -67,16 +93,15 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
39
.github/workflows/clang-c++17.yml
vendored
39
.github/workflows/clang-c++17.yml
vendored
@ -2,9 +2,37 @@ name: clang-c++17
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,13 +44,12 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -38,7 +65,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install libc++
|
||||
run: |
|
||||
@ -51,7 +78,6 @@ jobs:
|
||||
export CXX=clang++
|
||||
export CXXFLAGS="-stdlib=libc++"
|
||||
export LDFLAGS="-stdlib=libc++"
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -67,16 +93,15 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
53
.github/workflows/clang-c++20.yml
vendored
53
.github/workflows/clang-c++20.yml
vendored
@ -2,9 +2,37 @@ name: clang-c++20
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
# Temporary fix. See https://github.com/actions/runner-images/issues/8659
|
||||
- name: Install newer Clang
|
||||
@ -34,7 +62,6 @@ jobs:
|
||||
export CXX=clang++-17
|
||||
export CXXFLAGS="-stdlib=libc++"
|
||||
export LDFLAGS="-stdlib=libc++"
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./
|
||||
clang-17 --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -50,7 +77,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
# Temporary fix. See https://github.com/actions/runner-images/issues/8659
|
||||
- name: Install newer Clang
|
||||
@ -63,7 +90,6 @@ jobs:
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./
|
||||
clang-17 --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -79,7 +105,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
# Temporary fix. See https://github.com/actions/runner-images/issues/8659
|
||||
- name: Install newer Clang
|
||||
@ -92,7 +118,6 @@ jobs:
|
||||
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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./
|
||||
clang-17 --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -108,7 +133,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
# Temporary fix. See https://github.com/actions/runner-images/issues/8659
|
||||
- name: Install newer Clang
|
||||
@ -121,7 +146,6 @@ jobs:
|
||||
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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./
|
||||
clang-17 --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -137,13 +161,12 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -159,13 +182,12 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -181,13 +203,12 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -203,17 +224,15 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
|
||||
77
.github/workflows/clang-c++23.yml
vendored
77
.github/workflows/clang-c++23.yml
vendored
@ -2,9 +2,37 @@ name: clang-c++23
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install libc++
|
||||
run: |
|
||||
@ -29,12 +57,19 @@ jobs:
|
||||
export CXX=clang++
|
||||
export CXXFLAGS="-stdlib=libc++"
|
||||
export LDFLAGS="-stdlib=libc++"
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -D BUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
# The system libc++/libc++abi are not built with ASan. Exception objects
|
||||
# (e.g. std::runtime_error's reference counted string) are allocated with
|
||||
# operator new inside libc++.so, but released with free() inside
|
||||
# libc++abi.so, which AddressSanitizer reports as an alloc-dealloc-mismatch.
|
||||
# This is a libc++ packaging issue, not an ETL defect, so the check is
|
||||
# disabled for this job only.
|
||||
env:
|
||||
ASAN_OPTIONS: alloc_dealloc_mismatch=0
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
build-clang-cpp23-linux-no-stl:
|
||||
@ -45,14 +80,13 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -DBUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
@ -67,14 +101,13 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -D BUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
@ -89,14 +122,13 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -D BUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
@ -111,14 +143,13 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -D BUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
@ -133,14 +164,13 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -D BUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
@ -155,14 +185,13 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -D BUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
@ -177,17 +206,15 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./
|
||||
cmake -D BUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 -DETL_ENABLE_SANITIZER=ON ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
|
||||
55
.github/workflows/clang-c++26.yml
vendored
55
.github/workflows/clang-c++26.yml
vendored
@ -2,9 +2,37 @@ name: clang-c++26
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -27,7 +55,6 @@ jobs:
|
||||
export CXX=clang++ && \
|
||||
export CXXFLAGS=-stdlib=libc++ && \
|
||||
export LDFLAGS=-stdlib=libc++ && \
|
||||
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \
|
||||
cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \
|
||||
clang --version && \
|
||||
make -j \$(getconf _NPROCESSORS_ONLN) && \
|
||||
@ -38,7 +65,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -49,7 +76,6 @@ jobs:
|
||||
cd /workspaces/etl && \
|
||||
export CC=clang && \
|
||||
export CXX=clang++ && \
|
||||
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \
|
||||
cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \
|
||||
clang --version && \
|
||||
make -j \$(getconf _NPROCESSORS_ONLN) && \
|
||||
@ -60,7 +86,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -71,7 +97,6 @@ jobs:
|
||||
cd /workspaces/etl && \
|
||||
export CC=clang && \
|
||||
export CXX=clang++ && \
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \
|
||||
clang --version && \
|
||||
make -j \$(getconf _NPROCESSORS_ONLN) && \
|
||||
@ -82,7 +107,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -93,7 +118,6 @@ jobs:
|
||||
cd /workspaces/etl && \
|
||||
export CC=clang && \
|
||||
export CXX=clang++ && \
|
||||
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \
|
||||
cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \
|
||||
clang --version && \
|
||||
make -j \$(getconf _NPROCESSORS_ONLN) && \
|
||||
@ -104,7 +128,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -115,7 +139,6 @@ jobs:
|
||||
cd /workspaces/etl && \
|
||||
export CC=clang && \
|
||||
export CXX=clang++ && \
|
||||
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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \
|
||||
clang --version && \
|
||||
make -j \$(getconf _NPROCESSORS_ONLN) && \
|
||||
@ -129,13 +152,12 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -151,13 +173,12 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -173,13 +194,12 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
@ -195,13 +215,12 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./
|
||||
clang --version
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
6
.github/workflows/clang-format.yaml
vendored
6
.github/workflows/clang-format.yaml
vendored
@ -7,12 +7,16 @@ on:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
name: clang-format
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
6
.github/workflows/clang-format_update.yaml
vendored
6
.github/workflows/clang-format_update.yaml
vendored
@ -3,12 +3,16 @@ name: clang-format-update
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install clang-format
|
||||
run: |
|
||||
|
||||
80
.github/workflows/clang-syntax-checks.yml
vendored
80
.github/workflows/clang-syntax-checks.yml
vendored
@ -2,9 +2,37 @@ name: clang syntax checks
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-clang-cpp03-linux-STL:
|
||||
@ -15,7 +43,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -33,7 +61,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -51,7 +79,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -69,7 +97,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -87,7 +115,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -105,7 +133,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -123,7 +151,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -141,7 +169,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -159,7 +187,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -177,7 +205,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -195,7 +223,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -213,7 +241,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -231,7 +259,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -249,7 +277,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -267,7 +295,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -285,7 +313,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -303,7 +331,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -321,7 +349,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -339,7 +367,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -357,7 +385,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -375,7 +403,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -393,7 +421,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -408,7 +436,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -428,7 +456,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -448,7 +476,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -468,7 +496,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
|
||||
30
.github/workflows/clang-tidy.yaml
vendored
30
.github/workflows/clang-tidy.yaml
vendored
@ -3,16 +3,44 @@ name: clang-tidy
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
clang-tidy:
|
||||
name: clang-tidy
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
29
.github/workflows/coverage.yml
vendored
29
.github/workflows/coverage.yml
vendored
@ -3,13 +3,36 @@ name: coverage
|
||||
on:
|
||||
push:
|
||||
branches: [ master, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
# Allow only one concurrent deployment to GitHub Pages
|
||||
concurrency:
|
||||
group: coverage-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# Grant GITHUB_TOKEN the minimum permissions needed at the workflow level
|
||||
@ -23,7 +46,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
||||
@ -4,6 +4,10 @@ on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
@ -15,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
# Check out the repository code
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6.0.3
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
34
.github/workflows/gcc-c++11.yml
vendored
34
.github/workflows/gcc-c++11.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++11
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,12 +44,11 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
git fetch
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./
|
||||
@ -39,12 +66,11 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
git fetch
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./
|
||||
|
||||
36
.github/workflows/gcc-c++14.yml
vendored
36
.github/workflows/gcc-c++14.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++14
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,11 +44,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./
|
||||
@ -38,11 +65,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./
|
||||
@ -50,4 +76,4 @@ jobs:
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
34
.github/workflows/gcc-c++17.yml
vendored
34
.github/workflows/gcc-c++17.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++17
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,11 +44,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./
|
||||
@ -38,11 +65,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./
|
||||
|
||||
42
.github/workflows/gcc-c++20.yml
vendored
42
.github/workflows/gcc-c++20.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++20
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,11 +44,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./
|
||||
@ -38,11 +65,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./
|
||||
@ -60,11 +86,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./
|
||||
@ -82,11 +107,10 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- 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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./
|
||||
@ -94,4 +118,4 @@ jobs:
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
30
.github/workflows/gcc-c++23-armhf.yml
vendored
30
.github/workflows/gcc-c++23-armhf.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++23-armhf
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-armhf -f .devcontainer/armhf/Dockerfile .
|
||||
|
||||
30
.github/workflows/gcc-c++23-i386.yml
vendored
30
.github/workflows/gcc-c++23-i386.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++23-i386
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-i386 -f .devcontainer/i386/Dockerfile .
|
||||
|
||||
30
.github/workflows/gcc-c++23-powerpc.yml
vendored
30
.github/workflows/gcc-c++23-powerpc.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++23-powerpc
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-powerpc -f .devcontainer/powerpc/Dockerfile .
|
||||
|
||||
30
.github/workflows/gcc-c++23-riscv64.yml
vendored
30
.github/workflows/gcc-c++23-riscv64.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++23-riscv64
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-riscv64 -f .devcontainer/riscv64/Dockerfile .
|
||||
|
||||
30
.github/workflows/gcc-c++23-s390x.yml
vendored
30
.github/workflows/gcc-c++23-s390x.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++23-s390x
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-s390x -f .devcontainer/s390x/Dockerfile .
|
||||
|
||||
40
.github/workflows/gcc-c++23.yml
vendored
40
.github/workflows/gcc-c++23.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++23
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -16,11 +44,10 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
|
||||
export CC=gcc-14
|
||||
export CXX=g++-14
|
||||
cmake -DBUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 ./
|
||||
@ -38,11 +65,10 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
|
||||
export CC=gcc-14
|
||||
export CXX=g++-14
|
||||
cmake -DBUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 ./
|
||||
@ -60,11 +86,10 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
|
||||
export CC=gcc-14
|
||||
export CXX=g++-14
|
||||
cmake -DBUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 ./
|
||||
@ -82,11 +107,10 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
|
||||
export CC=gcc-14
|
||||
export CXX=g++-14
|
||||
cmake -DBUILD_TESTS=ON -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 -DETL_OPTIMISATION=-O3 ./
|
||||
|
||||
40
.github/workflows/gcc-c++26.yml
vendored
40
.github/workflows/gcc-c++26.yml
vendored
@ -2,9 +2,37 @@ name: gcc-c++26
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -22,7 +50,6 @@ jobs:
|
||||
run: |
|
||||
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
|
||||
cd /workspaces/etl && \
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \
|
||||
@ -35,7 +62,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -44,7 +71,6 @@ jobs:
|
||||
run: |
|
||||
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
|
||||
cd /workspaces/etl && \
|
||||
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_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \
|
||||
@ -57,7 +83,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -66,7 +92,6 @@ jobs:
|
||||
run: |
|
||||
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
|
||||
cd /workspaces/etl && \
|
||||
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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \
|
||||
@ -79,7 +104,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -88,7 +113,6 @@ jobs:
|
||||
run: |
|
||||
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\
|
||||
cd /workspaces/etl && \
|
||||
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_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \
|
||||
|
||||
80
.github/workflows/gcc-syntax-checks.yml
vendored
80
.github/workflows/gcc-syntax-checks.yml
vendored
@ -2,9 +2,37 @@ name: gcc syntax checks
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-gcc-cpp03-linux-STL:
|
||||
@ -15,7 +43,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -33,7 +61,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -51,7 +79,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -69,7 +97,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -87,7 +115,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -105,7 +133,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -123,7 +151,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -141,7 +169,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -159,7 +187,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -177,7 +205,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -195,7 +223,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -213,7 +241,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -231,7 +259,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -249,7 +277,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -267,7 +295,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -285,7 +313,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -303,7 +331,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -321,7 +349,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -339,7 +367,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -357,7 +385,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -375,7 +403,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -393,7 +421,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -408,7 +436,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -428,7 +456,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -448,7 +476,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
@ -468,7 +496,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile .
|
||||
|
||||
6
.github/workflows/generator.yml
vendored
6
.github/workflows/generator.yml
vendored
@ -6,13 +6,17 @@ on:
|
||||
branches: [ master, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
generator-run:
|
||||
name: Header Generator
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
||||
30
.github/workflows/meson-gcc-c++23-no-stl.yml
vendored
30
.github/workflows/meson-gcc-c++23-no-stl.yml
vendored
@ -2,9 +2,37 @@ name: meson-gcc-c++23-no-stl
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install Meson
|
||||
run: sudo apt-get install -y meson
|
||||
|
||||
37
.github/workflows/msvc.yml
vendored
37
.github/workflows/msvc.yml
vendored
@ -2,9 +2,37 @@ name: msvc
|
||||
on:
|
||||
push:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
pull_request:
|
||||
branches: [ master, development, pull-request/* ]
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'BUILD.bazel'
|
||||
- 'MODULE.bazel*'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'subprojects/**'
|
||||
- '.devcontainer/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-windows-msvc-stl:
|
||||
@ -13,7 +41,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6.0.3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@ -34,7 +62,7 @@ jobs:
|
||||
runs-on: [windows-2022]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6.0.3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@ -56,7 +84,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6.0.3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@ -78,7 +106,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6.0.3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
@ -93,4 +121,3 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: test/Debug/etl_tests.exe -v
|
||||
|
||||
|
||||
6
.github/workflows/platformio-update.yml
vendored
6
.github/workflows/platformio-update.yml
vendored
@ -4,13 +4,17 @@ on:
|
||||
release:
|
||||
types: [published] # Trigger only when a GitHub release is published
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -422,3 +422,4 @@ test/build-coverage
|
||||
include/etl/iterator.h~RFfd5eda.TMP
|
||||
test/vs2022/Build
|
||||
docs/Messaging
|
||||
test/vs2026/Build
|
||||
|
||||
13
BUILD.bazel
13
BUILD.bazel
@ -20,14 +20,23 @@ package(default_visibility = ["//visibility:public"])
|
||||
# strip_include_prefix = ".",
|
||||
# )
|
||||
#
|
||||
# The default is empty, so ETL's built-in defaults are used unless overridden.
|
||||
# The default of this label_flag is incompatible. This makes sure that the consumer
|
||||
# explicitly sets a profile, even if it is the `no_profile` defined below.
|
||||
|
||||
label_flag(
|
||||
name = "etl_profile",
|
||||
build_setting_default = ":no_profile",
|
||||
build_setting_default = ":incompatible_profile",
|
||||
)
|
||||
|
||||
cc_library(name = "no_profile")
|
||||
|
||||
cc_library(
|
||||
name = "incompatible_profile",
|
||||
target_compatible_with = [
|
||||
"@platforms//:incompatible",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "etl",
|
||||
hdrs = glob(["include/**/*.h"]),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Embedded Template Library ETL",
|
||||
"version": "20.48.1",
|
||||
"version": "20.49.0",
|
||||
"authors": {
|
||||
"name": "John Wellbelove",
|
||||
"email": "john.wellbelove@etlcpp.com"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name=Embedded Template Library ETL
|
||||
version=20.48.1
|
||||
version=20.49.0
|
||||
author= John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
license=MIT
|
||||
|
||||
@ -188,7 +188,7 @@ A nested class that is sent to the user defined callback function.
|
||||
notification()
|
||||
```
|
||||
**Description**
|
||||
Default contructor.
|
||||
Default constructor.
|
||||
Initialises to a default constructed descriptor and a count of zero.
|
||||
|
||||
---
|
||||
|
||||
@ -39,7 +39,7 @@ type: hextra-home
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="https://etlcpp.github.io/etl/"><img src="https://github.com/ETLCPP/etl/actions/workflows/coverage.yml/badge.svg" alt="coverage"">
|
||||
<a href="https://etlcpp.github.io/etl/"><img src="https://github.com/ETLCPP/etl/actions/workflows/coverage.yml/badge.svg" alt="coverage"></a>
|
||||
<a href="https://www.codacy.com/manual/jwellbelove/etl"><img src="https://api.codacy.com/project/badge/Grade/3c14cd918ccf40008d0bcd7b083d5946" alt="Codacy"></a>
|
||||
</div>
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ This means you can find intersection points relative to a fixed reference line.
|
||||
|
||||

|
||||
|
||||
## Refection
|
||||
## Reflection
|
||||
|
||||
This describes reflecting a point across a reference line.
|
||||
It uses the intersection method described above.
|
||||
|
||||
@ -18,7 +18,7 @@ This may be used to implement a platform abstraction layer that allows an embedd
|
||||
| Template | Description |
|
||||
| ----------------- | ------------------------------------------------------------------------- |
|
||||
| etl::function | Callbacks to free or member functions taking zero or one parameter.<br/>Function pointer at runtime. |
|
||||
| etl::function_fv | Callback to a free function taking no parameters. (Functiion Void).<br/>Function pointer at compile time. |
|
||||
| etl::function_fv | Callback to a free function taking no parameters. (Function Void).<br/>Function pointer at compile time. |
|
||||
| etl::function_fp | Callback to a free function taking one parameter. (Function Parameter).<br/> Function pointer at compile time.
|
||||
| etl::function_mv | Callback to a member function taking no parameters. (Member Void).<br/>Function pointer at compile time. |
|
||||
| etl::function_imv | Callback to a member function taking no parameters. (Instance Member Void ).<br/>Instance reference and function pointer at compile time. |
|
||||
|
||||
@ -15,7 +15,7 @@ template <typename TFunction, size_t Size, typename TSlot = etl::delegate<TFunct
|
||||
class signal
|
||||
```
|
||||
`TFunction` The callback function signature.
|
||||
`Size` The maximum numbr of slots for the signal.
|
||||
`Size` The maximum number of slots for the signal.
|
||||
`TSlot` The callback slot type. Default = `etl::delegate<TFunction>`
|
||||
|
||||
## Types
|
||||
|
||||
@ -112,7 +112,7 @@ ETL_CONSTEXPR14
|
||||
etl::chrono::duration<TRep, TPeriod> operator =(const etl::chrono::duration<TRep2, TPeriod2>& other) ETL_NOEXCEPT
|
||||
```
|
||||
|
||||
### Convertion
|
||||
### Conversion
|
||||
```cpp
|
||||
ETL_CONSTEXPR14
|
||||
TRep count() const
|
||||
|
||||
@ -20,7 +20,7 @@ class month_weekday
|
||||
ETL_CONSTEXPR
|
||||
month_weekday()
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Default constructor.
|
||||
|
||||
---
|
||||
@ -31,7 +31,7 @@ month_weekday(const etl::chrono::month& m,
|
||||
const etl::chrono::weekday_indexed& wd)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Construct from month and weekday_indexed.
|
||||
|
||||
## Access
|
||||
@ -75,7 +75,7 @@ bool operator ==(const etl::chrono::month_weekday& lhs,
|
||||
const etl::chrono::month_weekday& rhs)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Equality operator.
|
||||
|
||||
---
|
||||
@ -86,7 +86,7 @@ bool operator !=(const etl::chrono::month_weekday& lhs,
|
||||
const etl::chrono::month_weekday& rhs)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Inequality operator.
|
||||
|
||||
---
|
||||
@ -97,7 +97,7 @@ bool operator <(const etl::chrono::month_weekday& lhs,
|
||||
const etl::chrono::month_weekday& rhs)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Less-than operator.
|
||||
|
||||
---
|
||||
@ -108,7 +108,7 @@ bool operator <=(const etl::chrono::month_weekday& lhs,
|
||||
const etl::chrono::month_weekday& rhs)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Less-than-equal operator.
|
||||
|
||||
---
|
||||
@ -119,7 +119,7 @@ bool operator <(const etl::chrono::month_weekday& lhs,
|
||||
const etl::chrono::month_weekday& rhs)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Greater-than operator.
|
||||
|
||||
---
|
||||
@ -130,7 +130,7 @@ bool operator <=(const etl::chrono::month_weekday& lhs,
|
||||
const etl::chrono::month_weekday& rhs)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Greater-than-equal operator.
|
||||
|
||||
---
|
||||
@ -141,7 +141,7 @@ auto operator <=>(const etl::chrono::month_weekday& lhs,
|
||||
const etl::chrono::month_weekday& rhs)
|
||||
ETL_NOEXCEPT
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Spaceship operator.
|
||||
C++20
|
||||
|
||||
@ -151,6 +151,6 @@ C++20
|
||||
template <typename TRep, typename TPeriod>
|
||||
struct hash<etl::chrono::month_weekday>
|
||||
```
|
||||
**Decription**
|
||||
**Description**
|
||||
Hash function for `etl::chrono::month_weekday`.
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ The year.
|
||||
|
||||
---
|
||||
|
||||
```coo
|
||||
```cpp
|
||||
ETL_NODISCARD
|
||||
ETL_CONSTEXPR14
|
||||
etl::chrono::month month() const
|
||||
|
||||
@ -356,7 +356,7 @@ bool equal(const etl::span<T1, N1>& lhs, const etl::span<T2, N2>& rhs)
|
||||
```
|
||||
**Description**
|
||||
Equality function.
|
||||
Performs a comparision of the range values.
|
||||
Performs a comparison of the range values.
|
||||
Returns `true` if one of the following are `true`
|
||||
1. Both spans are empty.
|
||||
2. They both point to the same range of data.
|
||||
|
||||
@ -38,13 +38,23 @@ Defines data as an array of 'int', of length '10', containing the supplied data.
|
||||
**C++11 and above**
|
||||
|
||||
```cpp
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_array(TValues&&... values)
|
||||
template <typename T = void, typename... TValues>
|
||||
constexpr auto make_array(TValues&&... values) -> etl::array</*element-type*/, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
The element type is `T` when supplied, otherwise the decayed common type of
|
||||
the arguments (the Library Fundamentals TS `make_array` design). An empty
|
||||
array requires the element type to be supplied explicitly, e.g.
|
||||
`etl::make_array<int>()`; a call with neither an element type nor arguments
|
||||
is ill-formed, as there is nothing to deduce the element type from.
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_array<int>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// Deduced element type: etl::array<int, 10>.
|
||||
auto data = etl::make_array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
// Explicit element type: etl::array<char, 10>. Each argument is converted.
|
||||
auto chars = etl::make_array<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
```
|
||||
|
||||
## Member types
|
||||
@ -314,3 +324,42 @@ operator >=
|
||||
```
|
||||
**Description**
|
||||
`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
T& get(etl::array<T, Size>& a)
|
||||
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
const T& get(const etl::array<T, Size>& a)
|
||||
```
|
||||
**Description**
|
||||
Gets a reference to the element at `Index` in the array.
|
||||
|
||||
## Structured bindings
|
||||
`etl::array` provides the tuple-like interface required for C++17 structured bindings.
|
||||
|
||||
```cpp
|
||||
etl::array<int, 3> a = { 1, 2, 3 };
|
||||
|
||||
auto& [x, y, z] = a; // x, y, z are references to a[0], a[1], a[2]
|
||||
```
|
||||
|
||||
```cpp
|
||||
template <typename T, size_t Size>
|
||||
struct tuple_size<etl::array<T, Size>>
|
||||
```
|
||||
**Description**
|
||||
Gets the number of elements in the array.
|
||||
Specialised in namespaces `etl` and `std` (the `std` specialisation allows the use of C++ structured bindings).
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
struct tuple_element<Index, etl::array<T, Size>>
|
||||
```
|
||||
**Description**
|
||||
Gets the type of the element at `Index` in the array.
|
||||
Specialised in namespaces `etl` and `std` (the `std` specialisation allows the use of C++ structured bindings).
|
||||
|
||||
@ -65,13 +65,20 @@ Defines data as an `forward_list` of int, of length 10, containing the supplied
|
||||
## Make template
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_forward_list(TValues&&... values)
|
||||
template <typename T = void, typename... TValues>
|
||||
constexpr auto make_forward_list(TValues&&... values) -> etl::forward_list</*element-type*/, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
The element type is `T` when supplied, otherwise the decayed common type of
|
||||
the arguments (the Library Fundamentals TS `make_array` design).
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_forward_list<int>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// Deduced element type: etl::forward_list<int, 10>.
|
||||
auto data = etl::make_forward_list(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
// Explicit element type: etl::forward_list<char, 10>. Each argument is converted.
|
||||
auto chars = etl::make_forward_list<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -8,7 +8,7 @@ weight: 4
|
||||
Similar to: `std::forward_list`
|
||||
{{< /callout >}}
|
||||
|
||||
An intrusive forward list.https://www.messenger.com/t/837634551/
|
||||
An intrusive forward list.
|
||||
|
||||
```cpp
|
||||
template <typename TValue, typename TLink>
|
||||
|
||||
@ -69,13 +69,20 @@ Defines data as an list of `int`, of length `10`, containing the supplied data.
|
||||
## Make template
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_list(TValues&&... values)
|
||||
template <typename T = void, typename... TValues>
|
||||
constexpr auto make_list(TValues&&... values) -> etl::list</*element-type*/, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
The element type is `T` when supplied, otherwise the decayed common type of
|
||||
the arguments (the Library Fundamentals TS `make_array` design).
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_list<int>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// Deduced element type: etl::list<int, 10>.
|
||||
auto data = etl::make_list(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
// Explicit element type: etl::list<char, 10>. Each argument is converted.
|
||||
auto chars = etl::make_list<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -40,13 +40,13 @@ template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_flat_map(TValues&&... values)
|
||||
constexpr auto make_flat_map(TPairs&&... pairs) -> etl::flat_map<TKey, TMapped, sizeof...(TPairs), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_flat_map<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
auto data = etl::make_flat_map<int, int>(etl::pair<int, int>{0, 1}, etl::pair<int, int>{2, 3},
|
||||
etl::pair<int, int>{4, 5}, etl::pair<int, int>{6, 7});
|
||||
```
|
||||
|
||||
## Member types
|
||||
@ -239,7 +239,7 @@ The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`)
|
||||
---
|
||||
|
||||
```cpp
|
||||
pair<iterator, bool> emplace((const value_type& value))
|
||||
pair<iterator, bool> emplace(const value_type& value)
|
||||
pair<iterator, bool> emplace(const key_type& key, const mapped_type& value)
|
||||
```
|
||||
**Description**
|
||||
|
||||
@ -33,20 +33,20 @@ etl::flat_multimap data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl:
|
||||
```
|
||||
Defines data as an `flat_multimap` of `int`/`int` pairs, of length 4, containing the supplied data.
|
||||
|
||||
## make_flat_map
|
||||
## make_flat_multimap
|
||||
C++11 and above
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_flat_map(TValues&&... values)
|
||||
constexpr auto make_flat_multimap(TPairs&&... pairs) -> etl::flat_multimap<TKey, TMapped, sizeof...(TPairs), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_flat_map<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
auto data = etl::make_flat_multimap<int, int>(etl::pair<int, int>{0, 1}, etl::pair<int, int>{2, 3},
|
||||
etl::pair<int, int>{4, 5}, etl::pair<int, int>{6, 7});
|
||||
```
|
||||
|
||||
## Member types
|
||||
@ -239,7 +239,7 @@ The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`)
|
||||
---
|
||||
|
||||
```cpp
|
||||
pair<iterator, bool> emplace((const value_type& value))
|
||||
pair<iterator, bool> emplace(const value_type& value)
|
||||
pair<iterator, bool> emplace(const key_type& key, const mapped_type& value)
|
||||
```
|
||||
**Description**
|
||||
|
||||
@ -38,13 +38,13 @@ template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_flat_map(TValues&&... values)
|
||||
constexpr auto make_map(TPairs&&... pairs) -> etl::map<TKey, TMapped, sizeof...(TPairs), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_map<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
auto data = etl::make_map<int, int>(etl::pair<int, int>{0, 1}, etl::pair<int, int>{2, 3},
|
||||
etl::pair<int, int>{4, 5}, etl::pair<int, int>{6, 7});
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -38,13 +38,13 @@ template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_flat_map(TValues&&... values)
|
||||
constexpr auto make_multimap(TPairs&&... pairs) -> etl::multimap<TKey, TMapped, sizeof...(TPairs), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_multimap<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
auto data = etl::make_multimap<int, int>(etl::pair<int, int>{0, 1}, etl::pair<int, int>{2, 3},
|
||||
etl::pair<int, int>{4, 5}, etl::pair<int, int>{6, 7});
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -36,19 +36,32 @@ etl::reference_flat_map data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5},
|
||||
Defines data as an reference_flat_map of int, of length 4, containing the supplied data.
|
||||
|
||||
## Make template
|
||||
C++11 and above
|
||||
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_reference_flat_map(TValues&&... values)
|
||||
constexpr auto make_reference_flat_map(TPairs&&... pairs) -> etl::reference_flat_map<TKey, TMapped, sizeof...(TPairs), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
auto data = etl::make_reference_flat_map<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
|
||||
{{< callout type="warning" >}}
|
||||
This example does not currently compile: `make_reference_flat_map` cannot be
|
||||
instantiated, because the reference containers have no `initializer_list`
|
||||
constructor for its braced return value to bind to. This is a known defect.
|
||||
{{< /callout >}}
|
||||
|
||||
```cpp
|
||||
// The referenced objects must outlive the container.
|
||||
etl::pair<int, int> p0{0, 1};
|
||||
etl::pair<int, int> p1{2, 3};
|
||||
etl::pair<int, int> p2{4, 5};
|
||||
etl::pair<int, int> p3{6, 7};
|
||||
|
||||
auto data = etl::make_reference_flat_map<int, int>(p0, p1, p2, p3);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
|
||||
@ -36,19 +36,32 @@ etl::reference_flat_multimap data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4
|
||||
Defines data as an reference_flat_multimap of int, of length 4, containing the supplied data.
|
||||
|
||||
## Make template
|
||||
C++11 and above
|
||||
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
template <typename TKey,
|
||||
typename TMapped,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_reference_flat_map(TValues&&... values)
|
||||
constexpr auto make_reference_flat_multimap(TPairs&&... pairs) -> etl::reference_flat_multimap<TKey, TMapped, sizeof...(TPairs), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
auto data = etl::make_reference_flat_multimap<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
|
||||
{{< callout type="warning" >}}
|
||||
This example does not currently compile: `make_reference_flat_multimap` cannot be
|
||||
instantiated, because the reference containers have no `initializer_list`
|
||||
constructor for its braced return value to bind to. This is a known defect.
|
||||
{{< /callout >}}
|
||||
|
||||
```cpp
|
||||
// The referenced objects must outlive the container.
|
||||
etl::pair<int, int> p0{0, 1};
|
||||
etl::pair<int, int> p1{2, 3};
|
||||
etl::pair<int, int> p2{4, 5};
|
||||
etl::pair<int, int> p3{6, 7};
|
||||
|
||||
auto data = etl::make_reference_flat_multimap<int, int>(p0, p1, p2, p3);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
|
||||
@ -44,17 +44,17 @@ C++11 and above
|
||||
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TValue,
|
||||
typename THash = etl::hash<TKey>,
|
||||
typename TKeyEqual = etl::equal_to<TKey>
|
||||
typename T,
|
||||
typename THash = etl::hash<TKey>,
|
||||
typename TKeyEqual = etl::equal_to<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_unordered_map(TValues&&... values)
|
||||
constexpr auto make_unordered_map(TPairs&&... pairs) -> etl::unordered_map<TKey, T, sizeof...(TPairs), sizeof...(TPairs), THash, TKeyEqual>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_unordered_map<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
auto data = etl::make_unordered_map<int, int>(etl::pair<int, int>{0, 1}, etl::pair<int, int>{2, 3},
|
||||
etl::pair<int, int>{4, 5}, etl::pair<int, int>{6, 7});
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -42,17 +42,17 @@ C++11 and above
|
||||
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TValue,
|
||||
typename THash = etl::hash<TKey>,
|
||||
typename TKeyEqual = etl::equal_to<TKey>
|
||||
typename T,
|
||||
typename THash = etl::hash<TKey>,
|
||||
typename TKeyEqual = etl::equal_to<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_unordered_map(TValues&&... values)
|
||||
constexpr auto make_unordered_multimap(TPairs&&... pairs) -> etl::unordered_multimap<TKey, T, sizeof...(TPairs), sizeof...(TPairs), THash, TKeyEqual>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_unordered_map<int, int>(etl::pair{0, 1}, etl::pair{2, 3},
|
||||
etl::pair{4, 5}, etl::pair{6, 7});
|
||||
auto data = etl::make_unordered_multimap<int, int>(etl::pair<int, int>{0, 1}, etl::pair<int, int>{2, 3},
|
||||
etl::pair<int, int>{4, 5}, etl::pair<int, int>{6, 7});
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -72,7 +72,7 @@ generic_pool_ext(char* buffer, size_t size)
|
||||
```
|
||||
**Description**
|
||||
For `etl::generic_pool_ext`.
|
||||
Constructs a generic_pool from an external bufffer.
|
||||
Constructs a generic_pool from an external buffer.
|
||||
No elements are constructed.
|
||||
|
||||
## Operations
|
||||
|
||||
@ -94,7 +94,7 @@ pool_ext(char* buffer, size_t size)
|
||||
```
|
||||
**Description**
|
||||
For `etl::pool_ext`.
|
||||
Constructs a pool from an external bufffer.
|
||||
Constructs a pool from an external buffer.
|
||||
No elements are constructed.
|
||||
|
||||
## Operations
|
||||
|
||||
@ -69,11 +69,19 @@ const_reverse_iterator reverse_iterator<const_iterator>
|
||||
```cpp
|
||||
circular_buffer<typename T, size_t SIZE>();
|
||||
|
||||
circular_buffer<typename T, size_t SIZE>(size_t initial_size);
|
||||
|
||||
circular_buffer<typename T, size_t SIZE>(size_t initial_size, const_reference value);
|
||||
|
||||
circular_buffer<typename T, size_t SIZE>(const etl::circular_buffer<typename T, size_t SIZE>& other);
|
||||
|
||||
circular_buffer<typename T, size_t SIZE>(etl::circular_buffer<typename T, size_t SIZE>&& other);
|
||||
```
|
||||
|
||||
The `initial_size` constructor fills the buffer with default-constructed values.
|
||||
The `initial_size` and `value` constructor fills the buffer with copies of `value`.
|
||||
If `initial_size` exceeds `SIZE`, the buffer is filled to its capacity.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
@ -81,6 +89,10 @@ circular_buffer_ext(void* buffer, size_t max_size)
|
||||
|
||||
circular_buffer_ext(size_t max_size) 20.32.1
|
||||
|
||||
circular_buffer_ext(size_t initial_size, void* buffer, size_t max_size)
|
||||
|
||||
circular_buffer_ext(size_t initial_size, const_reference value, void* buffer, size_t max_size)
|
||||
|
||||
template <typename TIterator>
|
||||
circular_buffer_ext(TIterator first, const TIterator& last, void* buffer, size_t max_size)
|
||||
|
||||
@ -89,6 +101,10 @@ circular_buffer_ext(std::initializer_list<T> init, void* buffer, size_t max_size
|
||||
circular_buffer_ext(const circular_buffer_ext& other, void* buffer, size_t max_size)
|
||||
```
|
||||
|
||||
The `initial_size` constructor fills the buffer with default-constructed values.
|
||||
The `initial_size` and `value` constructor fills the buffer with copies of `value`.
|
||||
If `initial_size` exceeds `max_size`, the buffer is filled to its capacity. The external storage must contain at least `max_size + 1` elements.
|
||||
|
||||
## Status
|
||||
|
||||
```cpp
|
||||
@ -225,6 +241,26 @@ Returns the remaining available capacity in the `circular_buffer`.
|
||||
|
||||
## Modifiers
|
||||
|
||||
```cpp
|
||||
void assign(iterator first, const iterator& last)
|
||||
void assign(const_iterator first, const const_iterator& last)
|
||||
|
||||
template <typename TIterator>
|
||||
void assign(TIterator first, const TIterator& last)
|
||||
```
|
||||
**Description**
|
||||
Replaces the contents of the circular buffer with the elements in the range `[first, last)`. If the range exceeds the capacity, only the last `capacity()` elements are retained. The range may refer to the circular buffer being assigned.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
void assign(size_type n, const_reference value)
|
||||
```
|
||||
**Description**
|
||||
Replaces the contents of the circular buffer with `n` copies of `value`. If `n` exceeds the capacity, the buffer is filled to its capacity. `value` may refer to an element in the circular buffer being assigned.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
void set_buffer(void* buffer)
|
||||
```
|
||||
|
||||
@ -32,13 +32,22 @@ etl::deque data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
Defines data as an `deque` of `int`, of length `10`, containing the supplied data.
|
||||
|
||||
## Make template
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_deque(TValues&&... values)
|
||||
C++11 and above
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename T = void, typename... TValues>
|
||||
constexpr auto make_deque(TValues&&... values) -> etl::deque</*element-type*/, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
The element type is `T` when supplied, otherwise the decayed common type of
|
||||
the arguments (the Library Fundamentals TS `make_array` design).
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_deque<int>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// Deduced element type: etl::deque<int, 10>.
|
||||
auto data = etl::make_deque(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
// Explicit element type: etl::deque<char, 10>. Each argument is converted.
|
||||
auto chars = etl::make_deque<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -17,7 +17,7 @@ Uses `etl::less` as the default key comparison method.
|
||||
etl::const_multiset<typename TKey, size_t Size, TKeyCompare = etl::less>
|
||||
```
|
||||
|
||||
**Enternal storage**
|
||||
**Internal storage**
|
||||
```cpp
|
||||
etl::const_multiset_ext<typename TKey, TKeyCompare = etl::less>
|
||||
```
|
||||
@ -333,4 +333,4 @@ operator >=
|
||||
|
||||
## Technical stuff
|
||||
|
||||
The const set is implemented as a sorted array key/value pairs.
|
||||
The const set is implemented as a sorted array of values.
|
||||
|
||||
@ -17,7 +17,7 @@ Uses `etl::less` as the default key comparison method.
|
||||
etl::const_set<typename TKey, size_t Size, TKeyCompare = etl::less>
|
||||
```
|
||||
|
||||
**Enternal storage**
|
||||
**Internal storage**
|
||||
```cpp
|
||||
etl::const_set_ext<typename TKey, TKeyCompare = etl::less>
|
||||
```
|
||||
@ -333,4 +333,4 @@ operator >=
|
||||
|
||||
## Technical stuff
|
||||
|
||||
The const set is implemented as a sorted array key/value pairs.
|
||||
The const set is implemented as a sorted array of values.
|
||||
|
||||
@ -33,17 +33,18 @@ etl::flat_multiset data{ 0, 1, 2, 3 };
|
||||
```
|
||||
Defines data as an `flat_multiset` of `int`, of length 4, containing the supplied data.
|
||||
|
||||
## make_flat_set
|
||||
## make_flat_multiset
|
||||
C++11 and above
|
||||
```cpp
|
||||
template <typename T,
|
||||
typename TKeyCompare = etl::less<T>>
|
||||
constexpr auto make_flat_set(TValues&&... values)
|
||||
template <typename TKey,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... T>
|
||||
constexpr auto make_flat_multiset(T&&... keys) -> etl::flat_multiset<TKey, sizeof...(T), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_flat_set<int>({0, 1, 2, 3 });
|
||||
auto data = etl::make_flat_multiset<int>(0, 1, 2, 3);
|
||||
```
|
||||
|
||||
## Member types
|
||||
@ -234,55 +235,60 @@ The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`)
|
||||
---
|
||||
|
||||
```cpp
|
||||
pair<iterator, bool> emplace((const_reference value))
|
||||
pair<iterator, bool> emplace(const key_type& key, const mapped_type& value)
|
||||
pair<iterator, bool> emplace(const_reference value)
|
||||
```
|
||||
**Description**
|
||||
Inserts key/value pairs into the set by constructing directly into storage.
|
||||
Inserts a value into the set by constructing directly into storage.
|
||||
The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`)
|
||||
|
||||
---
|
||||
|
||||
**C++03**
|
||||
The emplace functions differ from that of std::set in that, due to C++03 not supporting 'perfect forwarding'.
|
||||
The emplace functions differ from that of std::multiset in that, due to C++03 not supporting 'perfect forwarding'.
|
||||
|
||||
```cpp
|
||||
pair<iterator, bool> emplace()
|
||||
```
|
||||
**Description**
|
||||
Emplaces a default constructed value into the set.
|
||||
|
||||
```cpp
|
||||
template <typename T1>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1)
|
||||
pair<iterator, bool> emplace(const T1& value1)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from `key` and 1 argument into the set.
|
||||
Emplaces a value constructed from 1 argument into the set.
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1, const T2& value2)
|
||||
pair<iterator, bool> emplace(const T1& value1, const T2& value2)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from `key` and 2 arguments into the set.
|
||||
Emplaces a value constructed from 2 arguments into the set.
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2, typename T3>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3)
|
||||
pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from `key` and 3 arguments into the set.
|
||||
Emplaces a value constructed from 3 arguments into the set.
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3, const T4& value4)
|
||||
pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3, const T4& value4)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from `key` and 4 arguments into the set.
|
||||
Emplaces a value constructed from 4 arguments into the set.
|
||||
|
||||
---
|
||||
|
||||
**C++11**
|
||||
```cpp
|
||||
template <typename ... Args>
|
||||
pair<iterator, bool> emplace(const key_type& key, Args&& ... args)
|
||||
pair<iterator, bool> emplace(Args&& ... args)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from the `key` and arguments into the set.
|
||||
Emplaces a value constructed from the arguments into the set.
|
||||
|
||||
---
|
||||
|
||||
@ -492,9 +498,9 @@ operator !=
|
||||
|
||||
## Technical stuff
|
||||
|
||||
Flat maps are usually implemented internally as a sorted vector of key/value pairs. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial keys or values.
|
||||
Flat sets are usually implemented internally as a sorted vector of values. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial values.
|
||||
As inserting requires that all of the items to the right of the insert position must be shifted this can become an expensive operation for larger containers.
|
||||
|
||||
To improve insertion performance ETL flat maps are implemented as vectors of pointers to key/value pairs, sorted by key value. An insertion will involve a copy of a range of pointers; an operation that can be very fast.
|
||||
To improve insertion performance ETL flat sets are implemented as vectors of pointers to values, sorted by value. An insertion will involve a copy of a range of pointers; an operation that can be very fast.
|
||||
|
||||
The downside is that access to an item via an iterator will involve one indirection and the overhead of the container will be one pointer per item. A normal flat set implementation does not have this overhead.
|
||||
|
||||
@ -36,14 +36,15 @@ Defines data as an `flat_set` of `int`, of length 4, containing the supplied dat
|
||||
## make_flat_set
|
||||
C++11 and above
|
||||
```cpp
|
||||
template <typename T,
|
||||
typename TKeyCompare = etl::less<T>>
|
||||
constexpr auto make_flat_set(TValues&&... values)
|
||||
template <typename TKey,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... T>
|
||||
constexpr auto make_flat_set(T&&... keys) -> etl::flat_set<TKey, sizeof...(T), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_flat_set<int>({0, 1, 2, 3 });
|
||||
auto data = etl::make_flat_set<int>(0, 1, 2, 3);
|
||||
```
|
||||
|
||||
## Member types
|
||||
@ -234,11 +235,10 @@ The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`)
|
||||
---
|
||||
|
||||
```cpp
|
||||
pair<iterator, bool> emplace((const_reference value))
|
||||
pair<iterator, bool> emplace(const key_type& key, const mapped_type& value)
|
||||
pair<iterator, bool> emplace(const_reference value)
|
||||
```
|
||||
**Description**
|
||||
Inserts key/value pairs into the set by constructing directly into storage.
|
||||
Inserts a value into the set by constructing directly into storage.
|
||||
The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`)
|
||||
|
||||
---
|
||||
@ -247,39 +247,48 @@ The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`)
|
||||
The emplace functions differ from that of `std::set` due to C++03 not supporting 'perfect forwarding'.
|
||||
|
||||
```cpp
|
||||
template <typename T1>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1)
|
||||
pair<iterator, bool> emplace()
|
||||
```
|
||||
**Description**
|
||||
|
||||
Emplaces a value constructed from `key` and 1 argument into the set.
|
||||
Emplaces a default constructed value into the set.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T1>
|
||||
pair<iterator, bool> emplace(const T1& value1)
|
||||
```
|
||||
**Description**
|
||||
|
||||
Emplaces a value constructed from 1 argument into the set.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1, const T2& value2)
|
||||
pair<iterator, bool> emplace(const T1& value1, const T2& value2)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from `key` and 2 arguments into the set.
|
||||
Emplaces a value constructed from 2 arguments into the set.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2, typename T3>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3)
|
||||
pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from `key` and 3 arguments into the set.
|
||||
Emplaces a value constructed from 3 arguments into the set.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
pair<iterator, bool> emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3, const T4& value4)
|
||||
pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3, const T4& value4)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from `key` and 4 arguments into the set.
|
||||
Emplaces a value constructed from 4 arguments into the set.
|
||||
|
||||
---
|
||||
|
||||
@ -287,10 +296,10 @@ Emplaces a value constructed from `key` and 4 arguments into the set.
|
||||
|
||||
```cpp
|
||||
template <typename ... Args>
|
||||
pair<iterator, bool> emplace(const key_type& key, Args&& ... args)
|
||||
pair<iterator, bool> emplace(Args&& ... args)
|
||||
```
|
||||
**Description**
|
||||
Emplaces a value constructed from the `key` and arguments into the set.
|
||||
Emplaces a value constructed from the arguments into the set.
|
||||
|
||||
---
|
||||
|
||||
@ -508,9 +517,9 @@ operator !=
|
||||
|
||||
## Technical stuff
|
||||
|
||||
Flat maps are usually implemented internally as a sorted vector of key/value pairs. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial keys or values.
|
||||
Flat sets are usually implemented internally as a sorted vector of values. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial values.
|
||||
As inserting requires that all of the items to the right of the insert position must be shifted this can become an expensive operation for larger containers.
|
||||
|
||||
To improve insertion performance ETL flat maps are implemented as vectors of pointers to key/value pairs, sorted by key value. An insertion will involve a copy of a range of pointers; an operation that can be very fast.
|
||||
To improve insertion performance ETL flat sets are implemented as vectors of pointers to values, sorted by value. An insertion will involve a copy of a range of pointers; an operation that can be very fast.
|
||||
|
||||
The downside is that access to an item via an iterator will involve one indirection and the overhead of the container will be one pointer per item. A normal flat set implementation does not have this overhead.
|
||||
|
||||
@ -37,13 +37,13 @@ Defines data as an multiset of `int`, of length 8, containing the supplied data.
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_set(TValues&&... values)
|
||||
typename... T>
|
||||
constexpr auto make_multiset(T&&... keys) -> etl::multiset<TKey, sizeof...(T), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_set<int>(0, 1, 2, 3, 4, 5, 6, 7);
|
||||
auto data = etl::make_multiset<int>(0, 1, 2, 3, 4, 5, 6, 7);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -32,13 +32,35 @@ etl::reference_flat_setdata{ 0, 1, 2, 3, 4, 5, 6, 7 };
|
||||
Defines data as a set of int/int pairs, of length 8, containing the supplied data.
|
||||
|
||||
## Make template
|
||||
C++11 and above
|
||||
template <typename TKey
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... T>
|
||||
constexpr auto make_reference_flat_set(T&&... values)
|
||||
constexpr auto make_reference_flat_multiset(T&&... keys) -> etl::reference_flat_multiset<TKey, sizeof...(T), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
auto data = etl::make_reference_flat_set<int>(0, 1, 2, 3, 4, 5, 6, 7);
|
||||
|
||||
{{< callout type="warning" >}}
|
||||
This example does not currently compile: `make_reference_flat_multiset` cannot be
|
||||
instantiated, because the reference containers have no `initializer_list`
|
||||
constructor for its braced return value to bind to. This is a known defect.
|
||||
{{< /callout >}}
|
||||
|
||||
```cpp
|
||||
// The referenced objects must outlive the container.
|
||||
int k0 = 0;
|
||||
int k1 = 1;
|
||||
int k2 = 2;
|
||||
int k3 = 3;
|
||||
int k4 = 4;
|
||||
int k5 = 5;
|
||||
int k6 = 6;
|
||||
int k7 = 7;
|
||||
|
||||
auto data = etl::make_reference_flat_multiset<int>(k0, k1, k2, k3, k4, k5, k6, k7);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
|
||||
@ -32,13 +32,35 @@ etl::reference_flat_setdata{ 0, 1, 2, 3, 4, 5, 6, 7 };
|
||||
Defines data as a set of int/int pairs, of length 8, containing the supplied data.
|
||||
|
||||
## Make template
|
||||
C++11 and above
|
||||
template <typename TKey
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... T>
|
||||
constexpr auto make_reference_flat_set(T&&... values)
|
||||
constexpr auto make_reference_flat_set(T&&... keys) -> etl::reference_flat_set<TKey, sizeof...(T), TKeyCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
auto data = etl::make_reference_flat_set<int>(0, 1, 2, 3, 4, 5, 6, 7);
|
||||
|
||||
{{< callout type="warning" >}}
|
||||
This example does not currently compile: `make_reference_flat_set` cannot be
|
||||
instantiated, because the reference containers have no `initializer_list`
|
||||
constructor for its braced return value to bind to. This is a known defect.
|
||||
{{< /callout >}}
|
||||
|
||||
```cpp
|
||||
// The referenced objects must outlive the container.
|
||||
int k0 = 0;
|
||||
int k1 = 1;
|
||||
int k2 = 2;
|
||||
int k3 = 3;
|
||||
int k4 = 4;
|
||||
int k5 = 5;
|
||||
int k6 = 6;
|
||||
int k7 = 7;
|
||||
|
||||
auto data = etl::make_reference_flat_set<int>(k0, k1, k2, k3, k4, k5, k6, k7);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
|
||||
@ -36,9 +36,9 @@ Defines data as an set of `int`, of length 8, containing the supplied data.
|
||||
|
||||
```cpp
|
||||
template <typename TKey,
|
||||
typename TKeyCompare = etl::less<TKey>,
|
||||
typename... TPairs>
|
||||
constexpr auto make_set(TValues&&... values)
|
||||
typename TCompare = etl::less<TKey>,
|
||||
typename... T>
|
||||
constexpr auto make_set(T&&... keys) -> etl::set<TKey, sizeof...(T), TCompare>
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
@ -3,4 +3,4 @@ title: "Variadics"
|
||||
weight: 100
|
||||
---
|
||||
|
||||
Containers tha accept multiple types.
|
||||
Containers that accept multiple types.
|
||||
@ -22,7 +22,7 @@ etl::packet<typename TBase, size_t SIZE, size_t ALIGNMENT>
|
||||
|
||||
`base_t` = `TBase`
|
||||
|
||||
## Contructors
|
||||
## Constructors
|
||||
|
||||
**C++03**
|
||||
```cpp
|
||||
|
||||
@ -42,6 +42,26 @@ etl::indirect_vector data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
```
|
||||
Defines data as an `indirect_vector` of `int`, of length `10`, containing the supplied data.
|
||||
|
||||
## Make template
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename T = void, typename... TValues>
|
||||
constexpr auto make_indirect_vector(TValues&&... values)
|
||||
-> etl::indirect_vector</*element-type*/, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
The element type is `T` when supplied, otherwise the decayed common type of
|
||||
the arguments (the Library Fundamentals TS `make_array` design).
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
// Deduced element type: etl::indirect_vector<int, 10>.
|
||||
auto data = etl::make_indirect_vector(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
// Explicit element type: etl::indirect_vector<char, 10>. Each argument is converted.
|
||||
auto chars = etl::make_indirect_vector<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
```cpp
|
||||
|
||||
@ -54,6 +54,25 @@ etl::vector data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
Defines data as an vector of int, of length 10, containing the supplied data.
|
||||
|
||||
## Make template
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename T = void, typename... TValues>
|
||||
constexpr auto make_vector(TValues&&... values) -> etl::vector</*element-type*/, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
The element type is `T` when supplied, otherwise the decayed common type of
|
||||
the arguments (the Library Fundamentals TS `make_array` design).
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
// Deduced element type: etl::vector<int, 10>.
|
||||
auto data = etl::make_vector(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
|
||||
// Explicit element type: etl::vector<char, 10>. Each argument is converted.
|
||||
auto chars = etl::make_vector<char>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
```cpp
|
||||
|
||||
@ -30,7 +30,7 @@ Lower case class and function names, separated by an underscore.
|
||||
`funky_container`
|
||||
`do_something`
|
||||
|
||||
### Nameing convension
|
||||
### Naming convention
|
||||
Use the same naming convention as the STL.
|
||||
If appropriate for the class, a set of `typedef`s should often be present to define types such as...
|
||||
|
||||
@ -159,7 +159,7 @@ class my_new_class
|
||||
```
|
||||
|
||||
### Layout
|
||||
When possible, try to tabluate the initialisation of multiple variables. It's a lot easier to read.
|
||||
When possible, try to tabulate the initialisation of multiple variables. It's a lot easier to read.
|
||||
Don't be too strict about it, if it would result in giant amounts of whitespace.
|
||||
|
||||
```cpp
|
||||
@ -240,4 +240,4 @@ When opening a new pull request, ensure that you include the following informati
|
||||
- Branches should be based on the branch `master`.
|
||||
`development` can change quite frequently, so I will rebase the your PR against it before merging.
|
||||
- For formatting help, you can use `clang-format`, or the convenience wrapper `treefmt`. See also [Source formatting]({{% relref "source-formatting.md" %}}).
|
||||
- Update the relevent documentation markdown file, found in `etl/docs`.
|
||||
- Update the relevant documentation markdown file, found in `etl/docs`.
|
||||
@ -83,19 +83,19 @@ These may be defined in the project settings or the user created `etl_profile.h`
|
||||
| `ETL_NODISCARD` | If `ETL_CPP11_SUPPORTED` is defined as `1` then this macro is defined as `[[nodiscard]]`, otherwise defined as blank.|
|
||||
| `ETL_DEPRECATED` | If `ETL_CPP14_SUPPORTED` is defined as `1` then this macro is defined as `[[deprecated]]`, otherwise defined as blank.|
|
||||
| `ETL_DEPRECATED_REASON(reason)` | If `ETL_CPP14_SUPPORTED` is defined as `1` then this macro is defined as `[[deprecated(reason)]]`, otherwise defined as blank.|
|
||||
| `ETL_FALLTHROUGH` | If `ETL_CPP17_SUPPORTED` is defined as `1` then this macro is defined as `[[falltrough]]`, otherwise defined as blank.|
|
||||
| `ETL_FALLTHROUGH` | If `ETL_CPP17_SUPPORTED` is defined as `1` then this macro is defined as `[[fallthrough]]`, otherwise defined as blank.|
|
||||
| `ETL_NORETURN` | If `ETL_CPP11_SUPPORTED` is defined as `1` then this macro is defined as `[[noreturn]]`, otherwise defined as blank.|
|
||||
| `ETL_OR_STD` | If ETL_NO_STL is defined and ETL_IN_UNIT_TEST is not then `ETL_OR_STD` is defined as `etl`, otherwise it is defined as `std`.|
|
||||
| `ETL_IN_UNIT_TEST` | If defined, then the code is being compiled in the unit tests.<br/>For internal ETL use only.|
|
||||
| `ETL_HAS_ATOMIC` | This is defined as `1` if the compiler supplies an atomic class, otherwise `0`.|
|
||||
| `ETL_INLINE_VAR` | If `ETL_CPP17_SUPPORTED` is defined as `1` then this macro is defined as `inline`, otherwise defined as blank.|
|
||||
| `ETL_USING_STL` | This macro will be defined as `0` & `1` dependant of whether `ETL_NO_STL` is defined or not.|
|
||||
| `ETL_USING_STL` | This macro will be defined as `0` & `1` depending on whether `ETL_NO_STL` is defined or not.|
|
||||
| `ETL_NOT_USING_STL` | Inversion of `ETL_USING_STL`.|
|
||||
| `ETL_USING_STLPORT` | This macro will be defined as `0` & `1` dependant of whether `ETL_STLPORT` is defined or not.|
|
||||
| `ETL_USING_STLPORT` | This macro will be defined as `0` & `1` depending on whether `ETL_STLPORT` is defined or not.|
|
||||
| `ETL_NOT_USING_STLPORT` | Inversion of `ETL_USING_STLPORT`.|
|
||||
| `ETL_USING_8BIT_TYPES` | This macro will be defined as `0` & `1` dependant of whether `CHAR_BIT == 8` or not.|
|
||||
| `ETL_USING_8BIT_TYPES` | This macro will be defined as `0` & `1` depending on whether `CHAR_BIT == 8` or not.|
|
||||
| `ETL_NOT_USING_8BIT_TYPES` | Inversion of `ETL_USING_8BIT_TYPES`.|
|
||||
| `ETL_USING_64BIT_TYPES` | This macro will be defined as `0` & `1` dependant of whether `ETL_NO_64BIT_TYPES` is defined or not.|
|
||||
| `ETL_USING_64BIT_TYPES` | This macro will be defined as `0` & `1` depending on whether `ETL_NO_64BIT_TYPES` is defined or not.|
|
||||
| `ETL_NOT_USING_64BIT_TYPES` | Inversion of `ETL_USING_64BIT_TYPES`.|
|
||||
| `ETL_HAS_ISTRING_REPAIR` | Set to `1` if the repair functionality for `etl::istring` is enabled, otherwise `0`.|
|
||||
| `ETL_HAS_IVECTOR_REPAIR` | Set to `1` if the repair functionality for `etl::ivector` is enabled, otherwise `0`.|
|
||||
@ -103,7 +103,7 @@ These may be defined in the project settings or the user created `etl_profile.h`
|
||||
| `ETL_IS_DEBUG_BUILD` | Set to `1` if in a debug build, otherwise `0`.|
|
||||
| `ETL_HAS_POLYMORPHIC_MESSAGES` | Set to `1` if messages are polymorphic, otherwise `0`.|
|
||||
| `ETL_HAS_ERROR_ON_STRING_TRUNCATION` | Set to `1` if truncated strings are an error, otherwise `0`.|
|
||||
| `ETL_USING_LIBC_WCHAR_H` | These macros will be defined as `0` & `1` dependant of whether `ETL_NO_LIBC_WCHAR_H` is defined or not.|
|
||||
| `ETL_USING_LIBC_WCHAR_H` | These macros will be defined as `0` & `1` depending on whether `ETL_NO_LIBC_WCHAR_H` is defined or not.|
|
||||
| `ETL_NOT_USING_LIBC_WCHAR_H` | Inversion of `ETL_USING_LIBC_WCHAR_H`.|
|
||||
| `ETL_USING_CPP11` | This is defined as `1` if the compiler supports C++11, otherwise `0`.|
|
||||
| `ETL_USING_CPP14` | This is defined as `1` if the compiler supports C++14, otherwise `0`.|
|
||||
|
||||
@ -133,6 +133,8 @@ ETL_CONSTEXPR17 typename std::iterator_traits<TIterator>::difference_type
|
||||
distance(TIterator first, TIterator last)
|
||||
```
|
||||
|
||||
See [Ranges](../../ranges/ranges) for the `etl::ranges` range access primitives, including `etl::ranges::distance`.
|
||||
|
||||
## iterator
|
||||
A base class provided to simplify definitions of the required types for iterators.
|
||||
https://en.cppreference.com/w/cpp/iterator/iterator
|
||||
|
||||
@ -30,13 +30,13 @@ etl::fixed_iterator(const etl::fixed_iterator&);
|
||||
```cpp
|
||||
Titerator get() const;
|
||||
```
|
||||
**Decscription**
|
||||
**Description**
|
||||
Get the internal iterator.
|
||||
|
||||
```cpp
|
||||
void get(TIterator it);
|
||||
```
|
||||
**Decscription**
|
||||
**Description**
|
||||
Set the iterator.
|
||||
|
||||
## Operators
|
||||
@ -44,7 +44,7 @@ Set the iterator.
|
||||
typename etl::iterator_traits<TIterator>::value_type operator *()
|
||||
const typename etl::iterator_traits<TIterator>::value_type operator *() const
|
||||
```
|
||||
**Decscription**
|
||||
**Description**
|
||||
Dereference operators
|
||||
|
||||
---
|
||||
@ -53,7 +53,7 @@ Dereference operators
|
||||
TIterator operator ->()
|
||||
const TIterator operator ->() const
|
||||
```
|
||||
**Decscription**
|
||||
**Description**
|
||||
Member dereference operators
|
||||
|
||||
---
|
||||
@ -61,7 +61,7 @@ Member dereference operators
|
||||
```cpp
|
||||
operator TIterator() const
|
||||
```
|
||||
**Decscription**
|
||||
**Description**
|
||||
Conversion operator
|
||||
|
||||
## Example
|
||||
|
||||
@ -177,7 +177,7 @@ bus2.subscribe(routerD);
|
||||
bus2.subscribe(routerC);
|
||||
|
||||
// Subscribe routerE to bus3.
|
||||
bus3.subscibe(routerE);
|
||||
bus3.subscribe(routerE);
|
||||
|
||||
// Assume all routers accept the same messages.
|
||||
|
||||
|
||||
@ -119,6 +119,63 @@ Output:
|
||||
|
||||
This first filters the even numbers and then squares them. Each `|` passes the result of the previous stage as input to the next view adaptor.
|
||||
|
||||
## Range Access and Primitives
|
||||
|
||||
These are declared in the `etl::ranges` namespace in `iterator.h`, which is included by `ranges.h`.
|
||||
|
||||
### Range access
|
||||
|
||||
Function objects, equivalent to their `std::ranges` counterparts.
|
||||
|
||||
| Name | Description |
|
||||
|---|---|
|
||||
| `begin`, `end` | The iterator to the first element, and the sentinel. |
|
||||
| `cbegin`, `cend` | The const iterator to the first element, and the const sentinel. |
|
||||
| `rbegin`, `rend` | The reverse iterator to the last element in forward order, and the past-the-end reverse iterator. |
|
||||
| `crbegin`, `crend` | The const reverse iterator to the last element in forward order, and the const past-the-end reverse iterator. |
|
||||
| `size` | The number of elements, as a `size_t`. |
|
||||
| `ssize` | The number of elements, as a `ptrdiff_t`. |
|
||||
| `empty` | Whether the range has no elements. |
|
||||
| `data`, `cdata` | A pointer to the first element. |
|
||||
| `distance` | The number of elements between two iterators, or in a range. |
|
||||
| `advance` | Advances an iterator by a given distance and/or to a bound. |
|
||||
| `next`, `prev` | An iterator advanced forwards or backwards by a given distance and/or to a bound. |
|
||||
|
||||
`size` and `ssize` use the range's `size()` member if it has one; otherwise they count the elements by traversing the range, which requires at least a forward range.
|
||||
|
||||
#### distance
|
||||
|
||||
```cpp
|
||||
// Iterator and sentinel of the same type.
|
||||
template <typename I>
|
||||
constexpr etl::iter_difference_t<I> distance(I first, I last)
|
||||
|
||||
// Iterator and sentinel of different types.
|
||||
template <typename I, typename S>
|
||||
constexpr etl::iter_difference_t<I> distance(I first, S last)
|
||||
|
||||
// Range.
|
||||
template <typename R>
|
||||
constexpr etl::iter_difference_t<etl::ranges::iterator_t<R>> distance(R&& r)
|
||||
```
|
||||
|
||||
The range overload uses the range's `size()` member if it has one; otherwise it counts the elements by traversing from `begin()` to `end()`.
|
||||
|
||||
### Range primitives
|
||||
|
||||
Alias templates that give the associated types of a range.
|
||||
|
||||
| Name | Description |
|
||||
|---|---|
|
||||
| `iterator_t<R>` | The iterator type. |
|
||||
| `const_iterator_t<R>` | The const iterator type. |
|
||||
| `sentinel_t<R>` | The sentinel type. |
|
||||
| `const_sentinel_t<R>` | The const sentinel type. |
|
||||
| `range_size_t<R>` | The size type. |
|
||||
| `range_difference_t<R>` | The difference type. |
|
||||
| `range_value_t<R>` | The element value type. |
|
||||
| `range_reference_t<R>` | The element reference type. |
|
||||
|
||||
## Supported Views
|
||||
|
||||
All views are in the `etl::ranges` namespace. Corresponding range adaptor objects are available in `etl::ranges::views`.
|
||||
|
||||
@ -5,6 +5,79 @@ weight: 2002
|
||||
|
||||
Click on the links to see the original Github page.
|
||||
|
||||
## 20.49.0
|
||||
|
||||
**Pull requests:**
|
||||
|
||||
[#1502](https://github.com/ETLCPP/etl/pull/1502) Remove the documentation page for `etl::type_id`
|
||||
[#1503](https://github.com/ETLCPP/etl/pull/1503) Add `difference_type` to span
|
||||
[#1504](https://github.com/ETLCPP/etl/pull/1504) Add missing `array` `get<>` overloads, and noexcept/constexpr
|
||||
[#1505](https://github.com/ETLCPP/etl/pull/1505) Support structured bindings for array
|
||||
[#1506](https://github.com/ETLCPP/etl/pull/1506) Add safe integer comparisons
|
||||
[#1507](https://github.com/ETLCPP/etl/pull/1507) Various fixes and cleanup
|
||||
[#1508](https://github.com/ETLCPP/etl/pull/1508) Remove redundant `reinterpret_cast`
|
||||
[#1509](https://github.com/ETLCPP/etl/pull/1509) Add `etl::apply`
|
||||
[#1510](https://github.com/ETLCPP/etl/pull/1510) Fix `variant` `emplace` to be valueless after a throwing construction
|
||||
[#1511](https://github.com/ETLCPP/etl/pull/1511) Fix deep const-cast in `ivector` pointer repair for const pointee types
|
||||
[#1513](https://github.com/ETLCPP/etl/pull/1513) `string_view`: clamp n in `remove_prefix` and remove_suffix
|
||||
[#1514](https://github.com/ETLCPP/etl/pull/1514) Fix `variant` copy operations enabled with non-copyable alternatives
|
||||
[#1515](https://github.com/ETLCPP/etl/pull/1515) Clean up the use of type traits by using C++11 forms wherever possible
|
||||
[#1516](https://github.com/ETLCPP/etl/pull/1516) Restore .devcontainer/context directory removed by #1422
|
||||
[#1517](https://github.com/ETLCPP/etl/pull/1517) Update Github Actions to checkout@v6.0.3
|
||||
[#1519](https://github.com/ETLCPP/etl/pull/1519) fix(devcontainer): resolve missing packages in bullseye image
|
||||
[#1522](https://github.com/ETLCPP/etl/pull/1522) Fix ODR violation in `optional`
|
||||
[#1524](https://github.com/ETLCPP/etl/pull/1524) Fixed signed/unsigned mismatch warnings in VS2022
|
||||
[#1525](https://github.com/ETLCPP/etl/pull/1525) Fix `operator[]` for const `iota_view` and repeat_view
|
||||
[#1526](https://github.com/ETLCPP/etl/pull/1526) Fix `make_array` and `make_deque` rejecting const-qualified lvalues of the element type
|
||||
[#1528](https://github.com/ETLCPP/etl/pull/1528) Change `make_list` to take its arguments by forwarding reference
|
||||
[#1529](https://github.com/ETLCPP/etl/pull/1529) Fix `etl::common_type` decaying both arguments to `T2`
|
||||
[#1530](https://github.com/ETLCPP/etl/pull/1530) Correct the documented make_xxx factory signatures and examples
|
||||
[#1534](https://github.com/ETLCPP/etl/pull/1534) Prevent usage of `N` as template value parameter
|
||||
[#1535](https://github.com/ETLCPP/etl/pull/1535) Make `etl_profile` Incompatible by Default
|
||||
[#1537](https://github.com/ETLCPP/etl/pull/1537) Fix ambiguous `byte_stream_reader` construction from `etl::span<uint8_t>`
|
||||
[#1538](https://github.com/ETLCPP/etl/pull/1538) Fix `expected::operator*() const&` and `&&` failing to compile
|
||||
[#1540](https://github.com/ETLCPP/etl/pull/1540) Fix flat_map/reference_flat_map to use random-access iterators in lower_bound
|
||||
[#1542](https://github.com/ETLCPP/etl/pull/1542) Remove redundant `noexcept` expr- #1542
|
||||
[#1544](https://github.com/ETLCPP/etl/pull/1544) Various cleanup
|
||||
[#1545](https://github.com/ETLCPP/etl/pull/1545) Add etl::`is_standard_layout` and other type traits according to std
|
||||
[#1546](https://github.com/ETLCPP/etl/pull/1546) Fix `delegate` clear through assignment
|
||||
[#1548](https://github.com/ETLCPP/etl/pull/1548) `delegate`: restore argument deduction behaviour
|
||||
[#1550](https://github.com/ETLCPP/etl/pull/1550) Add span deduction guide for types with `data()` and `size()`
|
||||
[#1552](https://github.com/ETLCPP/etl/pull/1552) Add Macro for Inline Control
|
||||
[#1553](https://github.com/ETLCPP/etl/pull/1553) Adopt the Library Fundamentals TS `make_array` design for the sequence factories
|
||||
[#1554](https://github.com/ETLCPP/etl/pull/1554) Fix PowerPC Dockerfile to use Snapshot consistently
|
||||
[#1555](https://github.com/ETLCPP/etl/pull/1555) Constexpr for unaligned_type
|
||||
[#1556](https://github.com/ETLCPP/etl/pull/1556) `circular_buffer`: add initialization and assignment overloads
|
||||
[#1557](https://github.com/ETLCPP/etl/pull/1557) CI: cancel superseded workflow runs
|
||||
[#1558](https://github.com/ETLCPP/etl/pull/1558) CI: Filter compiler workflows by path
|
||||
[#1559](https://github.com/ETLCPP/etl/pull/1559) Remove redundant `ETL_USING_STL` in tests
|
||||
[#1560](https://github.com/ETLCPP/etl/pull/1560) Set default compare for `iconst_map`
|
||||
[#1561](https://github.com/ETLCPP/etl/pull/1561) Allow easier construction of const_(multi_)map
|
||||
[#1562](https://github.com/ETLCPP/etl/pull/1562) Various cleanup
|
||||
[#1563](https://github.com/ETLCPP/etl/pull/1563) Cherry pick the Docker fixes for PowerPC
|
||||
[#1564](https://github.com/ETLCPP/etl/pull/1564) Update `etl::expected` documentation
|
||||
[#1565](https://github.com/ETLCPP/etl/pull/1565) Implement clamped_value utility
|
||||
[#1566](https://github.com/ETLCPP/etl/pull/1566) Fix guards in `array.h` and `test/test_array.h`
|
||||
[#1568](https://github.com/ETLCPP/etl/pull/1568) For optional monadic operations, add docs, tests, and complete type
|
||||
[#1569](https://github.com/ETLCPP/etl/pull/1569) Add missing `etl::ranges::distance` overload
|
||||
[#1570](https://github.com/ETLCPP/etl/pull/1570) Fix `FreeRTOS.h/semphr.h` include paths for ESP-IDF (fixes #1439)
|
||||
[#1571](https://github.com/ETLCPP/etl/pull/1571) Drop Debian 11 (bullseye) support
|
||||
[#1572](https://github.com/ETLCPP/etl/pull/1572) Fixed building and unit tests run under XCode 2027 Beta 6
|
||||
[#1573](https://github.com/ETLCPP/etl/pull/1573) Add missing type traits
|
||||
[#1574](https://github.com/ETLCPP/etl/pull/1574) Make `etl::variant` trivially copyable
|
||||
[#1576](https://github.com/ETLCPP/etl/pull/1576) Remove spurious link in documentation
|
||||
[#1578](https://github.com/ETLCPP/etl/pull/1578) Fix implicit conversion in binary rotations
|
||||
[#1579](https://github.com/ETLCPP/etl/pull/1579) Fix sanitizer builds
|
||||
[#1580](https://github.com/ETLCPP/etl/pull/1580) Support variable number of arguments to inject at runtime
|
||||
[#1581](https://github.com/ETLCPP/etl/pull/1581) Detect builtins
|
||||
[#1582](https://github.com/ETLCPP/etl/pull/1582) Fix symbols to be exportable from C++20 named modules
|
||||
[#1583](https://github.com/ETLCPP/etl/pull/1583) absolute and casting updates
|
||||
[#1586](https://github.com/ETLCPP/etl/pull/1586) Fix size type of `string_view`
|
||||
[#1588](https://github.com/ETLCPP/etl/pull/1588) Optimize `format.h`
|
||||
[#1589](https://github.com/ETLCPP/etl/pull/1589) Fix MSVC C4244 warning in format specifiers
|
||||
[#1591](https://github.com/ETLCPP/etl/pull/1591) Fix false positive warning from GCC 16
|
||||
[#1595](https://github.com/ETLCPP/etl/pull/1595) Support runtime floating-point clamped_value before C++20
|
||||
|
||||
## 20.48.1
|
||||
|
||||
**Pull requests:**
|
||||
@ -73,7 +146,7 @@ Click on the links to see the original Github page.
|
||||
[#1432](https://github.com/ETLCPP/etl/pull/1432) Simplify and fix test/run-syntax-checks.sh
|
||||
[#1433](https://github.com/ETLCPP/etl/pull/1433) Fix the case of using STL without pthreads but with mutexes
|
||||
[#1434](https://github.com/ETLCPP/etl/pull/1434) Remove unnecessary includes
|
||||
[#1437](https://github.com/ETLCPP/etl/pull/1437) ranges: Fix confict with Zephyr preprocessor definition
|
||||
[#1437](https://github.com/ETLCPP/etl/pull/1437) ranges: Fix conflict with Zephyr preprocessor definition
|
||||
[#1440](https://github.com/ETLCPP/etl/pull/1440) Make etl::variant capable for ROM placement and optimize runtime size
|
||||
[#1441](https://github.com/ETLCPP/etl/pull/1441) Make etl::variant capable for ROM placement and optimize runtime size
|
||||
[#1442](https://github.com/ETLCPP/etl/pull/1442) Fix format: float zero-padding, nested replacement width, octal alter…
|
||||
@ -152,7 +225,7 @@ Click on the links to see the original Github page.
|
||||
|
||||
**Issues:**
|
||||
[#1184](https://github.com/ETLCPP/etl/issues/1184) Request: Adding a method to check whether a etl::callback_timer_atomic is currently running
|
||||
[#1189](https://github.com/ETLCPP/etl/issues/1189) Request: make useage of osMutexRobust in etl::mutex optional
|
||||
[#1189](https://github.com/ETLCPP/etl/issues/1189) Request: make usage of osMutexRobust in etl::mutex optional
|
||||
[#1207](https://github.com/ETLCPP/etl/issues/1207) Monadic Operations for etl::expected
|
||||
[#1240](https://github.com/ETLCPP/etl/issues/1240) Add redundant semicolon checks to CMakeLists.txt and fix issues
|
||||
[#1241](https://github.com/ETLCPP/etl/issues/1241) Add -pedantic-errors to unit test CMakeLists.txt and fix issues
|
||||
@ -335,7 +408,7 @@ Removed redundant ETL_USING_WIDE_CHARACTERS
|
||||
Fixes:
|
||||
#1126 to_arithmetic-does-not-compile-on-C++98
|
||||
#1128 Request: Make Delegate Methods noexcept
|
||||
#1130 Use of etl::mem_copy for overlaped areas
|
||||
#1130 Use of etl::mem_copy for overlapped areas
|
||||
#1132 Make type_def Methods Noexcept
|
||||
#1143 v20.41.x, risc-v (esp32-c3) "No user defined specialisation of etl::underlying_type for this type"
|
||||
|
||||
@ -510,11 +583,11 @@ Fixes:
|
||||
#942 Warning on pragma c++20-compat
|
||||
#951 Can't get call_if to work because of etl::optional
|
||||
#956 Fix build error (etl::circular_buffer)
|
||||
#957 Support heterogenous lookup for maps
|
||||
#957 Support heterogeneous lookup for maps
|
||||
#959 Treat bitset with size_type
|
||||
#972 Template not allowed warning in parameter pack
|
||||
#979 QueuedMessageRouter does not work : message are not sent to queue
|
||||
#980 Documentation clarification: Add link from endianess to unaligned_type
|
||||
#980 Documentation clarification: Add link from endianness to unaligned_type
|
||||
#982 Added return to etl::optional emplace, fixed typo
|
||||
#984 Update Base64 Documentation
|
||||
#986 Added const iterators to span
|
||||
@ -639,7 +712,7 @@ Pull Requests:
|
||||
#905 Added support for type identity
|
||||
|
||||
Other:
|
||||
Reenabled address sanitizer for VS2022
|
||||
Re-enabled address sanitizer for VS2022
|
||||
|
||||
|
||||
20.38.16
|
||||
|
||||
@ -327,7 +327,7 @@ Inequality test for etl::to_arithmetic_result
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
ETL_CONSTEXPR14 bool operator !=(const T& lhs,
|
||||
const etl::to_arithmetic_result<T>& rhs)
|
||||
const etl::to_arithmetic_result<U>& rhs)
|
||||
```
|
||||
Inequality test for etl::to_arithmetic_result
|
||||
|
||||
|
||||
@ -3,4 +3,4 @@ title: "Timers"
|
||||
weight: 100
|
||||
---
|
||||
|
||||
Classes the implement timer based services.
|
||||
Classes that implement timer-based services.
|
||||
|
||||
@ -196,7 +196,7 @@ Test test;
|
||||
|
||||
//***************************************************************************
|
||||
// The interrupt guard type.
|
||||
// Saves and disables on contruction.
|
||||
// Saves and disables interrupts on construction.
|
||||
// Restores on destruction.
|
||||
//***************************************************************************
|
||||
struct InterruptGuard
|
||||
|
||||
@ -193,7 +193,7 @@ Message3 message3;
|
||||
|
||||
//***************************************************************************
|
||||
// The interrupt guard type.
|
||||
// Saves and disables on contruction.
|
||||
// Saves and disables on construction.
|
||||
// Restores on destruction.
|
||||
//***************************************************************************
|
||||
struct InterruptGuard
|
||||
|
||||
@ -15,7 +15,7 @@ struct timer
|
||||
{
|
||||
// Timer modes.
|
||||
struct mode
|
||||
{
|
||||
{
|
||||
enum
|
||||
{
|
||||
SINGLE_SHOT = false,
|
||||
|
||||
@ -19,7 +19,7 @@ This code demonstrates using the callback service for five example ARM interrupt
|
||||
`Timer3` has no entry in the callback service and will therefore trigger execution of the unhandled handler.
|
||||
|
||||
`USART1` and `USART2` interrupts are handled by instances of Uart.
|
||||
There callbacks are defined withing the class and are initialised in the Uart constructor.
|
||||
Their callbacks are defined within the class and are initialised in the Uart constructor.
|
||||
|
||||
```cpp
|
||||
#include <iostream>
|
||||
@ -146,7 +146,7 @@ Uart uart1(0, USART1_IRQ_HANDLER);
|
||||
Uart uart2(1, USART2_IRQ_HANDLER);
|
||||
|
||||
// Declare a global callback for the timer.
|
||||
// Uses the most efficient callback type for a class, as everthing is known at compile time.
|
||||
// Uses the most efficient callback type for a class, as everything is known at compile time.
|
||||
etl::function_imp<Timer, size_t, timer, &Timer::InterruptHandler> timer_member_callback;
|
||||
|
||||
// Declare the callbacks for the free functions.
|
||||
|
||||
@ -13,7 +13,7 @@ This code demonstrates using the delegate service for five example ARM interrupt
|
||||
`Timer3` has no entry in the callback service and will therefore trigger execution of the unhandled handler.
|
||||
|
||||
`USART1` and `USART2` interrupts are handled by instances of `Uart`.
|
||||
There callbacks are defined withing the class and are initialised in the `Uart` constructor.
|
||||
Their callbacks are defined within the class and are initialised in the `Uart` constructor.
|
||||
|
||||
```cpp
|
||||
#include <iostream>
|
||||
@ -137,7 +137,7 @@ Uart uart1(0, USART1_IRQ_HANDLER);
|
||||
Uart uart2(1, USART2_IRQ_HANDLER);
|
||||
|
||||
// Declare a global callback for the timer.
|
||||
// Uses the most efficient callback type for a class, as everthing is known at compile time.
|
||||
// Uses the most efficient callback type for a class, as everything is known at compile time.
|
||||
etl::delegate<void(size_t)> timer_member_callback =
|
||||
etl::delegate<void(size_t)>::create<Timer, timer, &Timer::InterruptHandler>();
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ To this end a template alias is defined; `etl::atomic_counted_message`, which us
|
||||
In a muti-threaded or interrupt driven system, a method must be derived to manage access to the pool.
|
||||
|
||||
All reference counted messages have an owner.
|
||||
Owners are obects based on `etl::ireference_counted_message_pool`.
|
||||
Owners are objects based on `etl::ireference_counted_message_pool`.
|
||||
|
||||
A reference counted message pool will allocate reference counted messages. The storage for these are allocated from a supplied memory block allocator.
|
||||
|
||||
@ -256,7 +256,7 @@ private:
|
||||
};
|
||||
|
||||
//*****************************************************************************
|
||||
// A message bus that can accomodate two subscribers.
|
||||
// A message bus that can accommodate two subscribers.
|
||||
//*****************************************************************************
|
||||
struct Bus : public etl::message_bus<2U>
|
||||
{
|
||||
|
||||
@ -249,3 +249,21 @@ template <typename T, typename... Types>
|
||||
ETL_CONSTEXPR14
|
||||
const T&& get(const tuple<Types...>&&);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename TFunction, typename TTuple>
|
||||
ETL_CONSTEXPR14
|
||||
auto apply(TFunction&& f, TTuple&& t);
|
||||
```
|
||||
|
||||
Invokes the callable object `f` (via `etl::invoke`) with the elements of the tuple `t` expanded as its arguments. Equivalent to `std::apply`.
|
||||
|
||||
```cpp
|
||||
int add(int a, int b, int c) { return a + b + c; }
|
||||
|
||||
auto t = etl::make_tuple(1, 2, 3);
|
||||
int sum = etl::apply(add, t); // sum == 6
|
||||
```
|
||||
|
||||
|
||||
@ -32,6 +32,28 @@ Not all traits have been defined as some rely on compiler intrinsics that are no
|
||||
`is_compound`
|
||||
`is_array`
|
||||
`is_pointer`
|
||||
`is_null_pointer`
|
||||
`is_scalar`
|
||||
`is_union`
|
||||
`is_empty`
|
||||
`is_polymorphic`
|
||||
`is_abstract`
|
||||
`is_final`
|
||||
`is_aggregate`
|
||||
`is_trivial`
|
||||
`is_standard_layout`
|
||||
`is_layout_compatible`
|
||||
`is_pointer_interconvertible_base_of`
|
||||
`is_destructible`
|
||||
`is_nothrow_destructible`
|
||||
`has_virtual_destructor`
|
||||
`has_unique_object_representations`
|
||||
`is_bounded_array`
|
||||
`is_unbounded_array`
|
||||
`is_swappable`
|
||||
`is_swappable_with`
|
||||
`is_nothrow_swappable`
|
||||
`is_nothrow_swappable_with`
|
||||
`is_reference`
|
||||
`is_base_of`
|
||||
`make_signed`
|
||||
@ -52,6 +74,7 @@ Not all traits have been defined as some rely on compiler intrinsics that are no
|
||||
`declvar` `20.28.0`
|
||||
`common_type`
|
||||
`is_enum` `20.30.0`
|
||||
`is_scoped_enum` `20.49.0`
|
||||
`underlying_type` `20.42.0`
|
||||
 Unless the ETL is set to use builtins, the user must specialise the template for their enumerations.
|
||||
|
||||
@ -67,8 +90,12 @@ The following will be defined according to the C++ standard and user defined mac
|
||||
`is_move_constructible`
|
||||
`is_trivially_constructible`
|
||||
`is_trivially_copy_constructible`
|
||||
`is_trivially_default_constructible`
|
||||
`is_trivially_move_constructible`
|
||||
`is_trivially_destructible`
|
||||
`is_trivially_assignable`
|
||||
`is_trivially_copy_assignable`
|
||||
`is_trivially_move_assignable`
|
||||
`is_trivially_copyable`
|
||||
|
||||
## Scenario 1
|
||||
@ -476,3 +503,499 @@ template <typename T>
|
||||
inline constexpr bool is_object_pointer_v = etl::is_object_pointer<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_pod
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_pod
|
||||
```
|
||||
Checks if `T` is a POD (Plain Old Data) type.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL, this is defined as `is_standard_layout<T> && is_trivially_default_constructible<T> && is_trivially_copyable<T>`.
|
||||
 When not using the STL, this is conservatively defined as `is_fundamental<T> || is_pointer<T>`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_pod_v = etl::is_pod<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_standard_layout
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_standard_layout
|
||||
```
|
||||
Checks if `T` is a standard-layout type.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_standard_layout_v = etl::is_standard_layout<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_trivial
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_trivial
|
||||
```
|
||||
Checks if `T` is a trivial type; i.e. it is trivially copyable and has one or more
|
||||
default constructors, all of which are trivial.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivial_v = etl::is_trivial<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
**Note:** When not using the STL, this trait requires compiler support (the `__is_trivial` intrinsic).
|
||||
If that is not available then the trait is not defined, as there is no portable way of
|
||||
determining whether a type is trivial.
|
||||
|
||||
## is_bounded_array
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_bounded_array
|
||||
```
|
||||
Checks if `T` is an array type of known bound.
|
||||
`T[N]` returns `true`, `T[]` and all other types return `false`.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_bounded_array_v = etl::is_bounded_array<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_unbounded_array
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_unbounded_array
|
||||
```
|
||||
Checks if `T` is an array type of unknown bound.
|
||||
`T[]` returns `true`, `T[N]` and all other types return `false`.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_unbounded_array_v = etl::is_unbounded_array<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_destructible
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_destructible
|
||||
```
|
||||
Checks if `T` is a destructible type; that is, an object type whose destructor is not deleted and is accessible, a reference type, or an array of a destructible type.
|
||||
Incomplete types, `void`, function types and arrays of unknown bound are not destructible.
|
||||
The result is found in the member `value`.
|
||||
 When not using the STL, the trait is detected by checking whether `declval<T&>().~T()` is a valid expression.
|
||||
 Requires either compiler support or C++11. When neither is available, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_destructible_v = etl::is_destructible<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_nothrow_destructible
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_nothrow_destructible
|
||||
```
|
||||
Checks if `T` is a destructible type whose destructor is known not to throw.
|
||||
Types that are not destructible are not nothrow destructible.
|
||||
The result is found in the member `value`.
|
||||
 When not using the STL, the trait is detected by checking `noexcept(declval<T&>().~T())` for destructible types.
|
||||
 Requires either compiler support or C++11. When neither is available, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_nothrow_destructible_v = etl::is_nothrow_destructible<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_swappable
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_swappable
|
||||
```
|
||||
Checks if `T` is a referenceable type and lvalues of type `T` can be swapped by an unqualified call to `swap`.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL and C++17, this is defined as `std::is_swappable<T>`.
|
||||
 Otherwise the trait checks whether `swap(declval<T&>(), declval<T&>())` is a valid expression, where the `swap` considered is `etl::swap`, `std::swap` if it is available, and any `swap` found by argument dependent lookup.
|
||||
 Requires C++11. Without it there is no way of detecting the validity of an expression, so this trait is not defined.
|
||||
 Note that when using the STL with C++11 or C++14, the accuracy of this trait depends on `std::swap` being constrained by the standard library implementation. Standard libraries that only constrain `std::swap` from C++17 will cause this trait to report `true` for types that cannot actually be swapped.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_swappable_v = etl::is_swappable<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_swappable_with
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
struct is_swappable_with
|
||||
```
|
||||
Checks if expressions of type `T` and `U` can be swapped by unqualified calls to `swap`, in both directions.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL and C++17, this is defined as `std::is_swappable_with<T, U>`.
|
||||
 Otherwise the trait checks whether both `swap(declval<T>(), declval<U>())` and `swap(declval<U>(), declval<T>())` are valid expressions, where the `swap` considered is `etl::swap`, `std::swap` if it is available, and any `swap` found by argument dependent lookup.
|
||||
 Note that, unlike `is_swappable`, no references are added to `T` and `U`, so the value categories of the arguments are those of `T` and `U`. `is_swappable_with<int, int>::value` is `false`, whereas `is_swappable_with<int&, int&>::value` is `true`.
|
||||
 Requires C++11. Without it there is no way of detecting the validity of an expression, so this trait is not defined.
|
||||
 Note that when using the STL with C++11 or C++14, the accuracy of this trait depends on `std::swap` being constrained by the standard library implementation. Standard libraries that only constrain `std::swap` from C++17 will cause this trait to report `true` for types that cannot actually be swapped.
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
inline constexpr bool is_swappable_with_v = etl::is_swappable_with<T, U>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_nothrow_swappable
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_nothrow_swappable
|
||||
```
|
||||
Checks if `T` is a referenceable type and lvalues of type `T` can be swapped by an unqualified call to `swap`, and that the swap cannot throw.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL and C++17, this is defined as `std::is_nothrow_swappable<T>`.
|
||||
 Otherwise the trait checks that `etl::is_swappable<T>::value` is `true` and that `swap(declval<T&>(), declval<T&>())` is `noexcept`.
|
||||
 Requires C++11. Without it there is no way of detecting the validity of an expression, so this trait is not defined.
|
||||
 Note that when neither the STL nor the type traits builtins are available, `etl::is_nothrow_move_constructible` and `etl::is_nothrow_move_assignable` are conservatively `false` for class types, so `etl::swap` is not `noexcept` for them and this trait is conservatively `false` too.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_nothrow_swappable_v = etl::is_nothrow_swappable<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_nothrow_swappable_with
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
struct is_nothrow_swappable_with
|
||||
```
|
||||
Checks if expressions of type `T` and `U` can be swapped by unqualified calls to `swap`, in both directions, and that neither swap can throw.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL and C++17, this is defined as `std::is_nothrow_swappable_with<T, U>`.
|
||||
 Otherwise the trait checks that `etl::is_swappable_with<T, U>::value` is `true` and that both `swap(declval<T>(), declval<U>())` and `swap(declval<U>(), declval<T>())` are `noexcept`.
|
||||
 Note that, as for `is_swappable_with`, no references are added to `T` and `U`, so the value categories of the arguments are those of `T` and `U`. `is_nothrow_swappable_with<int, int>::value` is `false`, whereas `is_nothrow_swappable_with<int&, int&>::value` is `true`.
|
||||
 Requires C++11. Without it there is no way of detecting the validity of an expression, so this trait is not defined.
|
||||
 Note that when neither the STL nor the type traits builtins are available, `etl::is_nothrow_move_constructible` and `etl::is_nothrow_move_assignable` are conservatively `false` for class types, so `etl::swap` is not `noexcept` for them and this trait is conservatively `false` too.
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
inline constexpr bool is_nothrow_swappable_with_v = etl::is_nothrow_swappable_with<T, U>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_union
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_union
|
||||
```
|
||||
Checks if `T` is a union type.
|
||||
The result is found in the member `value`.
|
||||
 When the compiler does not provide the required intrinsic, this trait conservatively reports `false` for every type.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_union_v = etl::is_union<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_empty
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_empty
|
||||
```
|
||||
Checks if `T` is an empty class type; that is, a non-union class type with no non-static data members other than zero-sized bit-fields, no virtual functions, no virtual base classes and no non-empty base classes.
|
||||
The result is found in the member `value`.
|
||||
 Requires compiler support. When the compiler does not provide the required intrinsic, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_empty_v = etl::is_empty<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_polymorphic
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_polymorphic
|
||||
```
|
||||
Checks if `T` is a polymorphic class type; that is, a class that declares or inherits at least one virtual function.
|
||||
The result is found in the member `value`.
|
||||
 Requires compiler support. When the compiler does not provide the required intrinsic, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_polymorphic_v = etl::is_polymorphic<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_abstract
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_abstract
|
||||
```
|
||||
Checks if `T` is an abstract class type; that is, a class that declares or inherits at least one pure virtual function.
|
||||
The result is found in the member `value`.
|
||||
 Requires compiler support. When the compiler does not provide the required intrinsic, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_abstract_v = etl::is_abstract<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_final
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_final
|
||||
```
|
||||
Checks if `T` is a class or union type marked `final`, optionally cv-qualified.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL, this requires C++14 or above. Otherwise it requires compiler support. When neither is available, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_final_v = etl::is_final<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_aggregate
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_aggregate
|
||||
```
|
||||
Checks if `T` is an aggregate type, optionally cv-qualified.
|
||||
An aggregate is an array type or a class type that has no user-declared or inherited constructors, no private or protected non-static data members, no virtual functions and no virtual, private or protected base classes.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL, this requires C++17 or above. Otherwise it requires compiler support. When neither is available, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_aggregate_v = etl::is_aggregate<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## has_virtual_destructor
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct has_virtual_destructor
|
||||
```
|
||||
Checks if `T` is a class type with a virtual destructor, optionally cv-qualified.
|
||||
The result is found in the member `value`.
|
||||
 When not using the STL, this requires compiler support. When it is not available, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool has_virtual_destructor_v = etl::has_virtual_destructor<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## has_unique_object_representations
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct has_unique_object_representations
|
||||
```
|
||||
Checks if `T` is trivially copyable and any two objects of type `T` with the same value have the same object representation; that is, the type has no padding bits and no two distinct object representations compare equal.
|
||||
Arrays and cv-qualifiers are ignored; the trait is applied to `etl::remove_all_extents<typename etl::remove_cv<T>::type>::type`.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL, this requires C++17 or above. Otherwise it requires compiler support. When neither is available, this trait is not defined.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool has_unique_object_representations_v = etl::has_unique_object_representations<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_null_pointer
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_null_pointer
|
||||
```
|
||||
Checks if `T` is `etl::nullptr_t`, optionally cv-qualified.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_null_pointer_v = etl::is_null_pointer<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_scalar
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_scalar
|
||||
```
|
||||
Checks if `T` is a scalar type; that is, an arithmetic, enumeration, pointer, pointer to member or `etl::nullptr_t` type, optionally cv-qualified.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_scalar_v = etl::is_scalar<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_scoped_enum
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_scoped_enum
|
||||
```
|
||||
Checks if `T` is a scoped enumeration type; that is, an enumeration type that is not implicitly convertible to an integer.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_scoped_enum_v = etl::is_scoped_enum<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_trivially_default_constructible
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_trivially_default_constructible
|
||||
```
|
||||
Checks if `T` is default constructible and the default construction is trivial.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_default_constructible_v = etl::is_trivially_default_constructible<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_trivially_move_constructible
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_trivially_move_constructible
|
||||
```
|
||||
Checks if `T` is move constructible and the move construction is trivial.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_move_constructible_v = etl::is_trivially_move_constructible<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_trivially_move_assignable
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct is_trivially_move_assignable
|
||||
```
|
||||
Checks if `T` is move assignable and the move assignment is trivial.
|
||||
The result is found in the member `value`.
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_move_assignable_v = etl::is_trivially_move_assignable<T>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_trivially_assignable
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2>
|
||||
struct is_trivially_assignable
|
||||
```
|
||||
Checks if an expression of type `T2` can be assigned to an lvalue expression of type `T1`, and that the assignment is trivial.
|
||||
The result is found in the member `value`.
|
||||
 See Scenarios 1 to 4 above for how this trait is defined when the STL or the compiler built-ins are unavailable.
|
||||
|
||||
```cpp
|
||||
template <typename T1, typename T2>
|
||||
inline constexpr bool is_trivially_assignable_v = etl::is_trivially_assignable<T1, T2>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_layout_compatible
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
struct is_layout_compatible
|
||||
```
|
||||
Checks if `T` and `U` are layout-compatible types.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL with C++20 or above, this is defined as `std::is_layout_compatible<T, U>`.
|
||||
 Otherwise it requires compiler support (the `__is_layout_compatible` intrinsic). When neither is available, this trait is not defined, as there is no portable way of determining layout compatibility.
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
inline constexpr bool is_layout_compatible_v = etl::is_layout_compatible<T, U>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
## is_pointer_interconvertible_base_of
|
||||
From: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename TBase, typename TDerived>
|
||||
struct is_pointer_interconvertible_base_of
|
||||
```
|
||||
Checks if `TBase` is a pointer-interconvertible base class of `TDerived`; that is, every object of type `TDerived` has its `TBase` base class subobject at the same address as the complete object.
|
||||
The result is found in the member `value`.
|
||||
 When using the STL with C++20 or above, this is defined as `std::is_pointer_interconvertible_base_of<TBase, TDerived>`.
|
||||
 Otherwise it requires compiler support (the `__is_pointer_interconvertible_base_of` intrinsic). When neither is available, this trait is not defined, as there is no portable way of determining pointer interconvertibility.
|
||||
 Note that, as required by the standard, the program is ill-formed if `TDerived` is a complete non-union class type and `TBase` is an incomplete class type. The trait cannot be used to probe possibly-incomplete types.
|
||||
|
||||
```cpp
|
||||
template <typename TBase, typename TDerived>
|
||||
inline constexpr bool is_pointer_interconvertible_base_of_v = etl::is_pointer_interconvertible_base_of<TBase, TDerived>::value;
|
||||
```
|
||||
C++17
|
||||
|
||||
@ -248,15 +248,15 @@ namespace etl
|
||||
etl::optional<CustomType> read_unchecked<CustomType>(etl::bit_stream_reader& stream)
|
||||
{
|
||||
char c = stream.read_unchecked<char, 7U>();
|
||||
short s = stream.read_unchecked<short , 11U>();
|
||||
int32_t i = stream.read_unchecked<int32_t, 25U>();
|
||||
short s = stream.read_unchecked<short>(11U);
|
||||
int32_t i = stream.read_unchecked<int32_t>(25U);
|
||||
|
||||
return CustomType { c, s, i };
|
||||
}
|
||||
}
|
||||
|
||||
std::array<char, 100U> storage; // Assume the buffer gets filled with bit stream data.
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size());
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::bit_order::msb_first);
|
||||
|
||||
// Read unchecked values from the stream.
|
||||
char c = etl::read_unchecked<char>(bit_stream, 6U);
|
||||
|
||||
@ -328,7 +328,7 @@ Sets the delegate to call after every write.
|
||||
callback_type get_callback() const
|
||||
```
|
||||
**Description**
|
||||
Gets the function to call afer every write.
|
||||
Gets the function to call after every write.
|
||||
|
||||
---
|
||||
|
||||
@ -397,13 +397,13 @@ namespace etl
|
||||
void write_unchecked<CustomType>(etl::bit_stream_reader& stream)
|
||||
{
|
||||
stream.write_unchecked<char, 7U>();
|
||||
stream.write_unchecked<short , 11U>();
|
||||
stream.write_unchecked<short, 11U>();
|
||||
stream.write_unchecked<int32_t, 25U>();
|
||||
}
|
||||
}
|
||||
|
||||
std::array<char, 100U> storage; // Assume the buffer gets filled with bit stream data.
|
||||
etl::bit_stream_reader bit_stream(storage.data(), storage.size());
|
||||
etl::bit_stream_writer bit_stream(storage.data(), storage.size(), etl::bit_order::msb_first);
|
||||
|
||||
// Write unchecked values to the stream.
|
||||
etl::write_unchecked<char>(bit_stream, 6U);
|
||||
|
||||
171
docs/utilities/clamped-value.md
Normal file
171
docs/utilities/clamped-value.md
Normal file
@ -0,0 +1,171 @@
|
||||
---
|
||||
title: "clamped_value"
|
||||
---
|
||||
|
||||
{{< callout type="info">}}
|
||||
Header: `clamped_value.h`
|
||||
Since: `TBC`
|
||||
{{< /callout >}}
|
||||
|
||||
Provides a value constrained between a minimum and maximum value. Values are
|
||||
clamped using `etl::clamp`. The type supports compile-time bounds to minimise
|
||||
storage and runtime bounds when the range must be changed. Integral types are
|
||||
supported in all language modes. Floating-point types with runtime bounds are
|
||||
supported in C++11 and later when `ETL_HAS_FLOATING_POINT_CLAMPED_VALUE` is
|
||||
`1`. Floating-point compile-time bounds require C++20 support for
|
||||
floating-point non-type template arguments.
|
||||
|
||||
## Availability
|
||||
|
||||
`ETL_HAS_FLOATING_POINT_CLAMPED_VALUE` is always defined by this header as
|
||||
either `0` or `1`. It defaults to `1` in C++11 and later. The related
|
||||
`ETL_HAS_COMPILE_TIME_FLOATING_POINT_CLAMPED_VALUE` macro defaults to `1` only
|
||||
when C++20 is enabled and the compiler supports floating-point non-type
|
||||
template arguments. A platform profile or build may define either macro before
|
||||
including the header to override automatic detection.
|
||||
|
||||
When `ETL_HAS_FLOATING_POINT_CLAMPED_VALUE` is `0`, `T` must be an integral
|
||||
type. When it is `1`, `float`, `double`, and `long double` may also be used with
|
||||
runtime bounds.
|
||||
|
||||
```cpp
|
||||
// C++11 and later
|
||||
template <typename T, T... Limits>
|
||||
class clamped_value;
|
||||
```
|
||||
|
||||
```cpp
|
||||
etl::clamped_value<int, 2, 7> value_ct; // Fixed range [2, 7].
|
||||
|
||||
etl::clamped_value<int> value_rt(2, 7, 5); // Runtime range and initial value.
|
||||
|
||||
#if ETL_HAS_FLOATING_POINT_CLAMPED_VALUE
|
||||
etl::clamped_value<double> float_rt(-1.5, 2.5, 0.5);
|
||||
#endif
|
||||
|
||||
#if ETL_HAS_COMPILE_TIME_FLOATING_POINT_CLAMPED_VALUE
|
||||
etl::clamped_value<float, -1.5f, 2.5f> float_ct(0.5f);
|
||||
#endif
|
||||
```
|
||||
|
||||
## Types
|
||||
|
||||
`difference_type` is the signed counterpart of `T` for integral values. For
|
||||
floating-point values, `difference_type` is `T`, allowing fractional steps.
|
||||
`limits_type` and `difference_limits_type` provide the corresponding
|
||||
`etl::numeric_limits` specializations.
|
||||
|
||||
## Constructors
|
||||
|
||||
```cpp
|
||||
clamped_value<int, 2, 7> value;
|
||||
```
|
||||
|
||||
Creates a compile-time clamped value initialized to `Min`.
|
||||
|
||||
```cpp
|
||||
clamped_value<int> value(min, max);
|
||||
clamped_value<int> value(min, max, initial);
|
||||
```
|
||||
|
||||
Creates a runtime clamped value. The two-argument form initializes the value
|
||||
to `min`; the three-argument form clamps `initial` to the range.
|
||||
|
||||
`min` must not be greater than `max`. Omitting the template bounds selects the
|
||||
runtime-bound specialization. Supplying `Min` and `Max` selects fixed
|
||||
compile-time bounds. NaN bounds and initial values are rejected. Infinite
|
||||
bounds and values are permitted.
|
||||
|
||||
## Modifiers
|
||||
|
||||
```cpp
|
||||
void set(T value);
|
||||
void set(T min, T max);
|
||||
void to_min();
|
||||
void to_max();
|
||||
void advance(difference_type n) ETL_NOEXCEPT;
|
||||
```
|
||||
|
||||
`set(T)` clamps the current value. The runtime `set(min, max)` changes the
|
||||
range and resets the value to the new minimum. `to_min()` and `to_max()` move
|
||||
the value directly to a bound. For integral values, `advance` uses the signed
|
||||
counterpart of `T` as its step type. For floating-point values, the step type
|
||||
is `T` and may be fractional. Steps saturate in constant time at the minimum
|
||||
or maximum rather than wrapping. NaN steps are rejected.
|
||||
|
||||
Positive steps move toward `max`; negative steps move toward `min`. Infinite
|
||||
steps saturate at a finite bound. Infinite values and bounds remain valid.
|
||||
|
||||
```cpp
|
||||
etl::clamped_value<float, -1.0f, 1.0f> value(0.25f);
|
||||
value.advance(0.5f); // 0.75f
|
||||
value.advance(10.0f); // 1.0f
|
||||
value.advance(-0.5f); // 0.5f
|
||||
```
|
||||
|
||||
Increment and decrement move by one and also saturate, including when a
|
||||
floating-point bound is less than one unit away:
|
||||
|
||||
```cpp
|
||||
++value; // Remains Max when already at Max.
|
||||
--value; // Remains Min when already at Min.
|
||||
```
|
||||
|
||||
## Access
|
||||
|
||||
```cpp
|
||||
ETL_NODISCARD T get() const noexcept;
|
||||
ETL_NODISCARD T min() const noexcept;
|
||||
ETL_NODISCARD T max() const noexcept;
|
||||
```
|
||||
|
||||
Gets the current value and its bounds. Both compile-time and runtime
|
||||
specializations provide these accessors as const-qualified member functions.
|
||||
|
||||
## Operators
|
||||
|
||||
```cpp
|
||||
ETL_NODISCARD operator T() const noexcept;
|
||||
clamped_value& operator++() & noexcept;
|
||||
clamped_value operator++(int) noexcept;
|
||||
clamped_value& operator--() & noexcept;
|
||||
clamped_value operator--(int) noexcept;
|
||||
clamped_value& operator=(T value) & noexcept;
|
||||
clamped_value& operator+=(difference_type n) & noexcept;
|
||||
clamped_value& operator-=(difference_type n) & noexcept;
|
||||
```
|
||||
|
||||
Conversion and assignment to the underlying type are supported. Assignment is
|
||||
clamped to the configured range. The lvalue reference qualification on
|
||||
assignment prevents assignment through temporary values where supported. For
|
||||
floating-point values, assignment and compound-assignment reject NaN.
|
||||
|
||||
Prefix increment and decrement return a reference to the updated object.
|
||||
Postfix increment and decrement return a copy of the value before it was
|
||||
updated. All four operations move by one and saturate at the applicable bound.
|
||||
|
||||
## Operations
|
||||
|
||||
```cpp
|
||||
ETL_CONSTEXPR14 void swap(clamped_value& other);
|
||||
ETL_CONSTEXPR14 void swap(clamped_value& lhs, clamped_value& rhs);
|
||||
```
|
||||
|
||||
Swaps clamped values. Runtime values also swap their bounds.
|
||||
|
||||
Equality, inequality, and relational comparisons are provided. Comparisons
|
||||
against arithmetic values use the implicit conversion to `T`. Equality
|
||||
compares the current values; runtime bounds do not affect equality. Runtime
|
||||
ranges must satisfy `min <= max`; invalid ranges trigger an ETL assertion. The
|
||||
default runtime specialization uses the full representable range of `T`.
|
||||
|
||||
Floating-point comparisons use the underlying values directly; no approximate
|
||||
or tolerance-based comparison is applied.
|
||||
|
||||
## Error Handling
|
||||
|
||||
Runtime ranges with `min > max` trigger an ETL assertion. NaN values, bounds,
|
||||
assignments, and steps also trigger an ETL assertion. Depending on the ETL
|
||||
error-handler configuration, an assertion may throw `etl::exception`, invoke a
|
||||
configured handler, or terminate. Operations that validate input are only
|
||||
`noexcept` when exceptions are disabled.
|
||||
@ -7,11 +7,11 @@ title: "endian"
|
||||
Since: `TBC`
|
||||
{{< /callout >}}
|
||||
|
||||
Constants & utilities for endianess.
|
||||
Constants & utilities for endianness.
|
||||
|
||||
For endian specific integral types, see `unaligned_type`.
|
||||
|
||||
The values for endianness are dependant on the platform setup.
|
||||
The values for endianness are dependent on the platform setup.
|
||||
|
||||
If `ETL_ENDIAN_NATIVE` is defined by the user, then
|
||||
 `etl::endian::little = 0`
|
||||
|
||||
@ -16,7 +16,7 @@ You have a choice of:
|
||||
- Error log
|
||||
- No error checking
|
||||
|
||||
The type of error handler used is dependant on the compile time macro defined.
|
||||
The type of error handler used is dependent on the compile time macro defined.
|
||||
Note: This are usually set as a project wide definition.
|
||||
|
||||
| Macro | Actions |
|
||||
|
||||
@ -192,13 +192,13 @@ Swap with another etl::unexpected
|
||||
```cpp
|
||||
template <typename TValue, typename TError>
|
||||
class expected
|
||||
```cpp
|
||||
```
|
||||
|
||||
Specialisation for void value type.
|
||||
```cpp
|
||||
template <typename TError>
|
||||
class expected<void, TError>
|
||||
```cpp
|
||||
```
|
||||
|
||||
### Types
|
||||
|
||||
@ -236,6 +236,72 @@ Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename U>
|
||||
ETL_CONSTEXPR14 expected(U&& value)
|
||||
```
|
||||
**Description**
|
||||
Construct the value type from a value implicitly convertible to it.
|
||||
Not selected when U is an etl::expected, etl::unexpected, etl::in_place_t, etl::unexpect_t or value_type itself.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename U>
|
||||
ETL_CONSTEXPR14 explicit expected(U&& value)
|
||||
```
|
||||
**Description**
|
||||
Construct the value type from a value that is only explicitly convertible to it.
|
||||
Constrained as above.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename U, typename G>
|
||||
expected(const etl::expected<U, G>& other)
|
||||
```
|
||||
**Description**
|
||||
Copy construct from an etl::expected<U, G> whose value and error types are both implicitly convertible.
|
||||
Not selected when value_type can be constructed from, or etl::unexpected<error_type> built from, the source etl::expected itself.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename U, typename G>
|
||||
explicit expected(const etl::expected<U, G>& other)
|
||||
```
|
||||
**Description**
|
||||
Copy construct from an etl::expected<U, G> whose value or error type is only explicitly convertible.
|
||||
Constrained as above.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename U, typename G>
|
||||
expected(etl::expected<U, G>&& other)
|
||||
```
|
||||
**Description**
|
||||
Move construct from an etl::expected<U, G> whose value and error types are both implicitly convertible.
|
||||
Constrained as above.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename U, typename G>
|
||||
explicit expected(etl::expected<U, G>&& other)
|
||||
```
|
||||
**Description**
|
||||
Move construct from an etl::expected<U, G> whose value or error type is only explicitly convertible.
|
||||
Constrained as above.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
ETL_CONSTEXPR14 expected(const expected& other) ETL_NOEXCEPT
|
||||
```
|
||||
@ -353,6 +419,17 @@ Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename U>
|
||||
expected& operator =(U&& value)
|
||||
```
|
||||
**Description**
|
||||
Assign from a value convertible to value_type.
|
||||
Constrained like the value constructor.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
expected& operator =(const unexpected_type& error)
|
||||
```
|
||||
@ -421,6 +498,7 @@ value_type& value() const
|
||||
Get the value.
|
||||
Undefined if has_value() returns false.
|
||||
Not valid for void specialisation.
|
||||
Before: C++11
|
||||
|
||||
---
|
||||
|
||||
@ -536,13 +614,46 @@ Before: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename G>
|
||||
ETL_NODISCARD
|
||||
ETL_CONSTEXPR14
|
||||
error_type error_or(G&& default_error) const&
|
||||
```
|
||||
**Description**
|
||||
Returns default_error if has_value() returns true; otherwise returns the stored error.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename G>
|
||||
ETL_NODISCARD
|
||||
ETL_CONSTEXPR14
|
||||
error_type error_or(G&& default_error)&&
|
||||
```
|
||||
**Description**
|
||||
Returns default_error if has_value() returns true; otherwise returns the stored error.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename G>
|
||||
error_type error_or(const G& default_error) const
|
||||
```
|
||||
**Description**
|
||||
Returns default_error if has_value() returns true; otherwise returns the stored error.
|
||||
Before: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename... TArgs>
|
||||
ETL_CONSTEXPR14 value_type& emplace(TArgs&&... args) ETL_NOEXCEPT
|
||||
```
|
||||
**Description**
|
||||
Returns the error if has_value() returns false.
|
||||
Undefined if has_value() returns true.
|
||||
Create from arguments.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
@ -574,15 +685,411 @@ Const class member access operator.
|
||||
---
|
||||
|
||||
```cpp
|
||||
value_type& operator *()
|
||||
value_type& operator *() &
|
||||
```
|
||||
**Description**
|
||||
**Description**
|
||||
Dereference operator.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
const value_type& operator *() const
|
||||
const value_type& operator *() const&
|
||||
```
|
||||
**Description**
|
||||
**Description**
|
||||
Dereference operator.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
value_type&& operator *() &&
|
||||
```
|
||||
**Description**
|
||||
Dereference operator.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
const value_type&& operator *() const&&
|
||||
```
|
||||
**Description**
|
||||
Dereference operator.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
ETL_NODISCARD
|
||||
ETL_CONSTEXPR14
|
||||
value_type* begin() ETL_NOEXCEPT
|
||||
```
|
||||
**Description**
|
||||
Returns a pointer to the value if has_value() returns true, otherwise returns nullptr.
|
||||
Allows expected to be used as a range of 0 or 1 elements. Not valid for void specialisation.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
ETL_NODISCARD
|
||||
ETL_CONSTEXPR14
|
||||
const value_type* begin() const ETL_NOEXCEPT
|
||||
```
|
||||
**Description**
|
||||
Returns a pointer to the value if has_value() returns true, otherwise returns nullptr. Not valid for void specialisation.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
ETL_NODISCARD
|
||||
ETL_CONSTEXPR14
|
||||
value_type* end() ETL_NOEXCEPT
|
||||
```
|
||||
**Description**
|
||||
Returns a pointer past the value if has_value() returns true, otherwise returns nullptr. Not valid for void specialisation.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
ETL_NODISCARD
|
||||
ETL_CONSTEXPR14
|
||||
const value_type* end() const ETL_NOEXCEPT
|
||||
```
|
||||
**Description**
|
||||
Returns a pointer past the value if has_value() returns true, otherwise returns nullptr. Not valid for void specialisation.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&>::type>::type>
|
||||
auto transform(F&& f) & -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f on the value and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
auto transform(F&& f) & -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&>::type>::type>
|
||||
auto transform(F&& f) const& -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f on the value and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
auto transform(F&& f) const& -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&&>::type>::type>
|
||||
auto transform(F&& f) && -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f on the value and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
auto transform(F&& f) && -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&&>::type>::type>
|
||||
auto transform(F&& f) const&& -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
auto transform(F&& f) const&& -> expected<U, TError>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result wrapped in an expected object; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&>::type>::type>
|
||||
auto and_then(F&& f) & -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f on the value and returns the result; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>
|
||||
auto and_then(F&& f) & -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&>::type>::type>
|
||||
auto and_then(F&& f) const& -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f on the value and returns the result; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
auto and_then(F&& f) const& -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&&>::type>::type>
|
||||
auto and_then(F&& f) && -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f on the value and returns the result; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
auto and_then(F&& f) && -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&&>::type>::type>
|
||||
auto and_then(F&& f) const&& -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it invokes f on the value and returns the result; otherwise it returns an expected object that contains error(). For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
auto and_then(F&& f) const&& -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it invokes f and returns the result; otherwise it returns an expected object that contains error().
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
auto or_else(F&& f) & -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected object that contains value(); otherwise it invokes f on error() and returns the result. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
auto or_else(F&& f) & -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
auto or_else(F&& f) const& -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected object that contains value(); otherwise it invokes f on error() and returns the result. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
auto or_else(F&& f) const& -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
auto or_else(F&& f) && -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected object that contains value(); otherwise it invokes f on error() and returns the result. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
auto or_else(F&& f) && -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
auto or_else(F&& f) const&& -> U
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected object that contains value(); otherwise it invokes f on error() and returns the result. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
auto or_else(F&& f) const&& -> U
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
auto transform_error(F&& f) & -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected that contains value(); otherwise it invokes f on error() and returns the result wrapped in an expected object. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
auto transform_error(F&& f) & -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result wrapped in an expected object.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
auto transform_error(F&& f) const& -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected that contains value(); otherwise it invokes f on error() and returns the result wrapped in an expected object. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
auto transform_error(F&& f) const& -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result wrapped in an expected object.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
auto transform_error(F&& f) && -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected that contains value(); otherwise it invokes f on error() and returns the result wrapped in an expected object. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
auto transform_error(F&& f) && -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result wrapped in an expected object.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
auto transform_error(F&& f) const&& -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
If has_value() returns true, it returns an expected that contains value(); otherwise it invokes f on error() and returns the result wrapped in an expected object. For void specialisation see below.
|
||||
Since: C++11
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
auto transform_error(F&& f) const&& -> expected<TValue, U>
|
||||
```
|
||||
**Description**
|
||||
For void specialisation.
|
||||
If has_value() returns true, it returns a default constructed expected object of the appropriate type; otherwise it invokes f on error() and returns the result wrapped in an expected object.
|
||||
Since: C++11
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ The `initializer_list` template class is a special case in that it *must* have a
|
||||
|
||||
This header will either include the standard `<initializer_list>` header, or attempt to define a `std::initializer_list` template class that is compatible with the current compiler.
|
||||
|
||||
The header will define `ETL_USING_INITIALIZER_LIST` to either `1` or `0` dependant of whether `std::initializer_list` is available or not.
|
||||
The header will define `ETL_USING_INITIALIZER_LIST` to either `1` or `0` dependent on whether `std::initializer_list` is available or not.
|
||||
|
||||
The ETL will select the STL version if you are using the STL and `ETL_FORCE_ETL_INITIALIZER_LIST` is not defined or,
|
||||
`ETL_FORCE_STD_INITIALIZER_LIST` is defined.
|
||||
|
||||
@ -222,6 +222,64 @@ bool has_value() const
|
||||
Checks whether *this is in a valid state, i.e. whether the contained value is initialised.
|
||||
Returns `true` if valid, otherwise `false`.
|
||||
|
||||
## Monadic operations
|
||||
C++11 and above.
|
||||
|
||||
Each operation is supplied as four reference qualified overloads (`&`, `const&`, `&&`, `const&&`),
|
||||
so that the contained value is passed to the supplied callable with the value category of `*this`.
|
||||
|
||||
```cpp
|
||||
template <typename F>
|
||||
etl::optional<U> transform(F&& f)
|
||||
```
|
||||
**Description**
|
||||
If `*this` contains a value, returns an `etl::optional<U>` containing the result of invoking `f`
|
||||
with the contained value, otherwise returns an empty `etl::optional<U>`.
|
||||
|
||||
`U` is the result type of `f`, with any reference and cv qualification removed.
|
||||
|
||||
### Note
|
||||
Unlike `std::optional::transform`, which only removes cv qualification, a callable returning a
|
||||
reference is accepted, and the referenced value is copied into the resulting optional.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F>
|
||||
U and_then(F&& f)
|
||||
```
|
||||
**Description**
|
||||
If `*this` contains a value, returns the result of invoking `f` with the contained value,
|
||||
otherwise returns an empty `U`.
|
||||
|
||||
`U` is the result type of `f`, with any reference and cv qualification removed, and must be an
|
||||
`etl::optional`. The overload takes no part in overload resolution otherwise.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename F>
|
||||
U or_else(F&& f)
|
||||
```
|
||||
**Description**
|
||||
If `*this` contains a value, returns a copy of `*this`, otherwise returns the result of invoking
|
||||
`f` with no arguments.
|
||||
|
||||
`U` is the result type of `f`, with any reference and cv qualification removed, and must be an
|
||||
`etl::optional` whose `value_type` is `T`. The overload takes no part in overload resolution
|
||||
otherwise.
|
||||
|
||||
### Example
|
||||
|
||||
```cpp
|
||||
etl::optional<int> opt = 6;
|
||||
|
||||
etl::optional<double> result = opt.and_then([](int i) { return i > 0 ? etl::optional<int>(i * 2) : etl::optional<int>(); })
|
||||
.or_else([]() { return etl::optional<int>(1); })
|
||||
.transform([](int i) { return double(i) / 2.0; });
|
||||
// result contains 6.0
|
||||
```
|
||||
|
||||
## Non-member functions
|
||||
|
||||
```cpp
|
||||
@ -269,3 +327,15 @@ operator >=
|
||||
```
|
||||
**Description**
|
||||
`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct etl::is_optional;
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool etl::is_optional_v; // C++17 and above
|
||||
```
|
||||
**Description**
|
||||
`true` if `T` is an `etl::optional`, otherwise `false`. Any cv qualification on `T` is ignored.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user