mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-10 07:09:46 +08:00
Merge branch 'development' into jhe/semaphores
This commit is contained in:
commit
17dda7958f
0
.devcontainer/context/.gitkeep
Normal file
0
.devcontainer/context/.gitkeep
Normal file
@ -1,10 +1,32 @@
|
||||
# powerpc Test Environment for ETL
|
||||
# Uses QEMU user-mode emulation to run powerpc binaries on x64 host
|
||||
FROM debian:sid-20260406
|
||||
#
|
||||
# NOTE: floating tags like "sid" or "sid-slim" drift over time and cannot be
|
||||
# pinned retroactively (Docker Hub keeps only the latest manifest per tag).
|
||||
# debian:sid-20260202 is a dated, immutable tag (built and pushed once, not
|
||||
# retagged later), pinned here by digest for full reproducibility. All apt
|
||||
# sources are also switched to the matching snapshot.debian.org archive
|
||||
# before the first "apt-get update" runs.
|
||||
FROM debian@sha256:9ab6e6f3543eeb30510c516377bbb05f95ebb7507a956c0b772184deb7ecd340
|
||||
|
||||
# Avoid prompts from apt
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Pin apt to the snapshot.debian.org archive for the given date BEFORE any
|
||||
# package installation, so every apt-get update/install in this file (not
|
||||
# just the ones after this point) resolves to the exact same package set.
|
||||
RUN rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*.sources
|
||||
|
||||
RUN cat <<EOF > /etc/apt/sources.list.d/debian.sources
|
||||
Types: deb
|
||||
URIs: http://snapshot.debian.org/archive/debian/20260202T000000Z
|
||||
Suites: sid
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
|
||||
EOF
|
||||
|
||||
RUN echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid
|
||||
|
||||
# Install QEMU user-mode emulation and powerpc cross-compilation tools
|
||||
RUN dpkg --add-architecture powerpc && \
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
@ -20,25 +42,15 @@ RUN dpkg --add-architecture powerpc && \
|
||||
debian-ports-archive-keyring \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN cat <<EOF > /etc/apt/sources.list.d/debian.sources
|
||||
Types: deb
|
||||
URIs: http://snapshot.debian.org/archive/debian/20260406T000000Z
|
||||
Suites: sid
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
|
||||
EOF
|
||||
|
||||
RUN cat <<EOF > /etc/apt/sources.list.d/powerpc.sources
|
||||
Types: deb
|
||||
URIs: http://snapshot.debian.org/archive/debian-ports/20260406T000000Z
|
||||
URIs: http://snapshot.debian.org/archive/debian-ports/20260202T000000Z
|
||||
Suites: sid
|
||||
Components: main
|
||||
Architectures: powerpc
|
||||
Signed-By: /usr/share/keyrings/debian-ports-archive-keyring.gpg
|
||||
EOF
|
||||
|
||||
RUN echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
qemu-user-static \
|
||||
qemu-user \
|
||||
|
||||
30
.github/workflows/bazel-gcc-c++23-no-stl.yml
vendored
30
.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,7 +41,7 @@ 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
|
||||
|
||||
36
.github/workflows/clang-c++11.yml
vendored
36
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -38,7 +66,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install libc++
|
||||
run: |
|
||||
@ -67,7 +95,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -79,4 +107,4 @@ jobs:
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
36
.github/workflows/clang-c++14.yml
vendored
36
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -38,7 +66,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install libc++
|
||||
run: |
|
||||
@ -67,7 +95,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -79,4 +107,4 @@ jobs:
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
36
.github/workflows/clang-c++17.yml
vendored
36
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -38,7 +66,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Install libc++
|
||||
run: |
|
||||
@ -67,7 +95,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -79,4 +107,4 @@ jobs:
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
45
.github/workflows/clang-c++20.yml
vendored
45
.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
|
||||
@ -50,7 +78,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
|
||||
@ -79,7 +107,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
|
||||
@ -108,7 +136,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
|
||||
@ -137,7 +165,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -159,7 +187,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -181,7 +209,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -203,7 +231,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -216,4 +244,3 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
|
||||
45
.github/workflows/clang-c++23.yml
vendored
45
.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: |
|
||||
@ -45,7 +73,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -67,7 +95,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -89,7 +117,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -111,7 +139,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -133,7 +161,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -155,7 +183,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -177,7 +205,7 @@ jobs:
|
||||
os: [macos-15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -190,4 +218,3 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
|
||||
46
.github/workflows/clang-c++26.yml
vendored
46
.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 .
|
||||
@ -38,7 +66,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 .
|
||||
@ -60,7 +88,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 .
|
||||
@ -82,7 +110,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 .
|
||||
@ -104,7 +132,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 .
|
||||
@ -129,7 +157,7 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -151,7 +179,7 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -173,7 +201,7 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -195,7 +223,7 @@ jobs:
|
||||
os: [macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
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
|
||||
|
||||
32
.github/workflows/gcc-c++11.yml
vendored
32
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -39,7 +67,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
34
.github/workflows/gcc-c++14.yml
vendored
34
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -38,7 +66,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -50,4 +78,4 @@ jobs:
|
||||
make -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
||||
- name: Run tests
|
||||
run: ./test/etl_tests -v
|
||||
run: ./test/etl_tests -v
|
||||
|
||||
32
.github/workflows/gcc-c++17.yml
vendored
32
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -38,7 +66,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
38
.github/workflows/gcc-c++20.yml
vendored
38
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -38,7 +66,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -60,7 +88,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -82,7 +110,7 @@ jobs:
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -94,4 +122,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 .
|
||||
|
||||
36
.github/workflows/gcc-c++23.yml
vendored
36
.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,7 +44,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -38,7 +66,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -60,7 +88,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@ -82,7 +110,7 @@ jobs:
|
||||
os: [ubuntu-24.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6.0.3
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
36
.github/workflows/gcc-c++26.yml
vendored
36
.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 .
|
||||
@ -35,7 +63,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 .
|
||||
@ -57,7 +85,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 .
|
||||
@ -79,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 .
|
||||
|
||||
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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -39,7 +39,7 @@ Defines data as an array of 'int', of length '10', containing the supplied data.
|
||||
|
||||
```cpp
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_array(TValues&&... values)
|
||||
constexpr auto make_array(TValues&&... values) -> etl::array<T, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
### Example
|
||||
@ -314,3 +314,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,15 @@ 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>
|
||||
constexpr auto make_forward_list(T&&... t) -> etl::forward_list<typename etl::common_type_t<T...>, sizeof...(T)>
|
||||
```
|
||||
|
||||
The element type is deduced as the common type of the arguments.
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_forward_list<int>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
auto data = etl::make_forward_list(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
```
|
||||
|
||||
## Member types
|
||||
|
||||
@ -69,13 +69,15 @@ 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>
|
||||
constexpr auto make_list(T&&... t) -> etl::list<typename etl::common_type_t<T...>, sizeof...(T)>
|
||||
```
|
||||
|
||||
The element type is deduced as the common type of the arguments.
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
auto data = etl::make_list<int>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
auto data = etl::make_list(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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -32,9 +32,11 @@ 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
|
||||
**C++11 and above**
|
||||
```cpp
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_deque(TValues&&... values)
|
||||
C++11 and above
|
||||
constexpr auto make_deque(TValues&&... values) -> etl::deque<T, sizeof...(TValues)>
|
||||
```
|
||||
|
||||
### Example
|
||||
```cpp
|
||||
|
||||
@ -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>
|
||||
```
|
||||
|
||||
@ -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>
|
||||
```
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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`.|
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -73,7 +73,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 +152,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 +335,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 +510,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 +639,7 @@ Pull Requests:
|
||||
#905 Added support for type identity
|
||||
|
||||
Other:
|
||||
Reenabled address sanitizer for VS2022
|
||||
Re-enabled address sanitizer for VS2022
|
||||
|
||||
|
||||
20.38.16
|
||||
|
||||
@ -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
|
||||
```
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 |
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -1,112 +0,0 @@
|
||||
---
|
||||
title: "type_id"
|
||||
---
|
||||
|
||||
{{< callout type="info">}}
|
||||
Header: `type_id.h`
|
||||
Since: `TBC`
|
||||
{{< /callout >}}
|
||||
|
||||
Below is a concise, technical overview of the `etl::type_id` facility, suitable for design documentation or code review context.
|
||||
|
||||
## Overview:
|
||||
`etl::type_id` is a lightweight, RTTI-free mechanism for uniquely identifying C++ types at runtime. It is designed for environments where standard RTTI (`typeid`, `std::type_info`) is unavailable, undesirable, or too costly—such as embedded systems or performance-constrained platforms.
|
||||
|
||||
The implementation guarantees uniqueness per type within a program image while remaining constexpr-friendly and requiring no dynamic allocation.
|
||||
|
||||
## Design Concept
|
||||
|
||||
The core idea is to associate each distinct type `T` with the address of a unique static object. That address serves as the type’s identifier.
|
||||
|
||||
This is achieved through:
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
struct type_id_anchor
|
||||
{
|
||||
static char value;
|
||||
};
|
||||
```
|
||||
|
||||
Each instantiation of `type_id_anchor<T>` owns its own `static char value`, and the address of that variable is guaranteed to be unique for each distinct `T`. The address is stable for the lifetime of the program.
|
||||
|
||||
## Key Components
|
||||
|
||||
### Type Normalization
|
||||
|
||||
When requesting a type ID via `type_id::get<T>()`, the type is first normalised:
|
||||
|
||||
```cpp
|
||||
using type = typename etl::remove_cvref<T>::type;
|
||||
```
|
||||
|
||||
This ensures that:
|
||||
|
||||
* `T`, `const T`, `T&`, and `T&&` all map to the same `type_id`
|
||||
* Only the underlying type identity matters
|
||||
|
||||
### Type ID Generation
|
||||
|
||||
```cpp
|
||||
template <typename T>
|
||||
static ETL_CONSTEXPR type_id get() ETL_NOEXCEPT;
|
||||
```
|
||||
|
||||
* Returns a `type_id` that uniquely represents `T`
|
||||
* Internally stores the address of `type_id_anchor<T>::value`
|
||||
* Requires no RTTI, no dynamic memory, and no runtime registration
|
||||
|
||||
### Invalid Type ID
|
||||
|
||||
```cpp
|
||||
static ETL_CONSTEXPR type_id invalid_id() ETL_NOEXCEPT;
|
||||
```
|
||||
|
||||
* Represents an invalid or uninitialised type ID
|
||||
* Implemented as a null pointer (`id == nullptr`)
|
||||
* Default constructor produces this state
|
||||
|
||||
## `type_id` Class Semantics
|
||||
|
||||
### Storage
|
||||
|
||||
```cpp
|
||||
const void* id;
|
||||
```
|
||||
|
||||
* The identifier is stored as a pointer
|
||||
* Comparison is purely pointer comparison (fast and deterministic)
|
||||
|
||||
### Supported Operations
|
||||
|
||||
| Operation | Behavior |
|
||||
| ------------------ | -------------------------------------------------- |
|
||||
| Equality (`==`) | True if both type IDs refer to the same type |
|
||||
| Inequality (`!=`) | Logical negation of equality |
|
||||
| Ordering (`<`) | Pointer comparison (useful for ordered containers) |
|
||||
| Boolean conversion | `true` if valid, `false` if invalid |
|
||||
| Integer conversion | Explicit conversion to `intptr_t` / `uintptr_t` |
|
||||
|
||||
### Copy and Assignment
|
||||
|
||||
* Copyable and assignable
|
||||
* Copy semantics preserve identity (pointer value)
|
||||
|
||||
## Guarantees and Properties
|
||||
|
||||
* **Uniqueness**: Each distinct type has exactly one unique `type_id`
|
||||
* **Stability**: Type IDs remain valid for the entire program lifetime
|
||||
* **Zero overhead**: No dynamic allocation, no lookup tables
|
||||
* **RTTI-free**: Suitable for builds with RTTI disabled
|
||||
* **Comparable**: Can be used as keys in associative containers
|
||||
|
||||
## Typical Use Cases
|
||||
|
||||
* Type-safe containers (e.g., variant, any, message buses)
|
||||
* Plugin or component systems
|
||||
* Compile-time / runtime type discrimination in embedded systems
|
||||
* Replacement for `std::type_index` in restricted environments
|
||||
|
||||
## Summary
|
||||
|
||||
`etl::type_id` provides a robust, minimal, and efficient alternative to C++ RTTI by encoding type identity as the address of a unique static object. Its design is particularly well-suited to embedded and low-level systems where determinism, performance, and binary size are critical.
|
||||
@ -71,6 +71,82 @@ T exchange(T& object, const U& new_value)
|
||||
Copies the new value to object and returns the old value.
|
||||
Note: This is not an atomic operation.
|
||||
|
||||
## Integer comparison functions
|
||||
|
||||
Safe comparison of integers of different signedness. Unlike the built-in
|
||||
comparison operators, negative signed integers always compare less than (and
|
||||
never equal to) unsigned integers, so the result is never affected by
|
||||
value-changing implicit conversions.
|
||||
The arguments must be standard signed or unsigned integer types, including
|
||||
`signed char` and `unsigned char`. `bool`, `char` and the extended character
|
||||
types are not permitted.
|
||||
When the STL is available and the compiler provides
|
||||
`__cpp_lib_integer_comparison_functions` (C++20), the `std` versions are used.
|
||||
Since: `20.49.0`
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
constexpr bool cmp_equal(T t, U u) noexcept
|
||||
```
|
||||
**Description**
|
||||
Returns `true` if `t` is equal to `u`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
constexpr bool cmp_not_equal(T t, U u) noexcept
|
||||
```
|
||||
**Description**
|
||||
Returns `true` if `t` is not equal to `u`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
constexpr bool cmp_less(T t, U u) noexcept
|
||||
```
|
||||
**Description**
|
||||
Returns `true` if `t` is less than `u`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
constexpr bool cmp_greater(T t, U u) noexcept
|
||||
```
|
||||
**Description**
|
||||
Returns `true` if `t` is greater than `u`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
constexpr bool cmp_less_equal(T t, U u) noexcept
|
||||
```
|
||||
**Description**
|
||||
Returns `true` if `t` is less than or equal to `u`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename T, typename U>
|
||||
constexpr bool cmp_greater_equal(T t, U u) noexcept
|
||||
```
|
||||
**Description**
|
||||
Returns `true` if `t` is greater than or equal to `u`.
|
||||
|
||||
---
|
||||
|
||||
```cpp
|
||||
template <typename R, typename T>
|
||||
constexpr bool in_range(T t) noexcept
|
||||
```
|
||||
**Description**
|
||||
Returns `true` if the value of `t` is in the range of values that can be
|
||||
represented by `R`, that is, if `t` can be converted to `R` without loss of its
|
||||
value.
|
||||
|
||||
## add_const
|
||||
|
||||
```cpp
|
||||
|
||||
@ -384,7 +384,7 @@ namespace etl
|
||||
/// constructor.
|
||||
//***************************************************************************
|
||||
template <typename... TArgs>
|
||||
typed_storage(TArgs&&... args) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
typed_storage(TArgs&&... args)
|
||||
: valid(false)
|
||||
{
|
||||
create(etl::forward<TArgs>(args)...);
|
||||
@ -456,7 +456,7 @@ namespace etl
|
||||
/// the internal byte array.
|
||||
//***************************************************************************
|
||||
template <typename... TArgs>
|
||||
reference create(TArgs&&... args) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
reference create(TArgs&&... args)
|
||||
{
|
||||
ETL_ASSERT(!has_value(), ETL_ERROR(etl::typed_storage_error));
|
||||
pointer p = ::new (&storage.value) value_type(etl::forward<TArgs>(args)...);
|
||||
@ -536,7 +536,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns a pointer of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
pointer operator->() ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
pointer operator->()
|
||||
{
|
||||
ETL_ASSERT(has_value(), ETL_ERROR(etl::typed_storage_error));
|
||||
|
||||
@ -546,7 +546,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns a const pointer of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
const_pointer operator->() const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
const_pointer operator->() const
|
||||
{
|
||||
ETL_ASSERT(has_value(), ETL_ERROR(etl::typed_storage_error));
|
||||
|
||||
@ -556,7 +556,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns reference of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
reference operator*() ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
reference operator*()
|
||||
{
|
||||
return *operator->();
|
||||
}
|
||||
@ -564,15 +564,15 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns const_reference of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
const_reference operator*() const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
const_reference operator*() const
|
||||
{
|
||||
return *operator->();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typed_storage(etl::typed_storage<T>&) ETL_DELETE;
|
||||
typed_storage& operator=(etl::typed_storage<T>&) ETL_DELETE;
|
||||
typed_storage(const etl::typed_storage<T>&) ETL_DELETE;
|
||||
typed_storage& operator=(const etl::typed_storage<T>&) ETL_DELETE;
|
||||
|
||||
struct dummy_t
|
||||
{
|
||||
@ -620,7 +620,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// Constructor.
|
||||
//***************************************************************************
|
||||
typed_storage_ext(void* pbuffer_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
typed_storage_ext(void* pbuffer_)
|
||||
: pbuffer(reinterpret_cast<T*>(pbuffer_))
|
||||
, valid(false)
|
||||
{
|
||||
@ -633,7 +633,7 @@ namespace etl
|
||||
/// constructor.
|
||||
//***************************************************************************
|
||||
template <typename... TArgs>
|
||||
typed_storage_ext(void* pbuffer_, TArgs&&... args) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
typed_storage_ext(void* pbuffer_, TArgs&&... args)
|
||||
: pbuffer(reinterpret_cast<T*>(pbuffer_))
|
||||
, valid(false)
|
||||
{
|
||||
@ -645,7 +645,7 @@ namespace etl
|
||||
/// Move constructor.
|
||||
/// Transfers ownership of the buffer from \p other to this.
|
||||
//***************************************************************************
|
||||
typed_storage_ext(typed_storage_ext<T>&& other) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
typed_storage_ext(typed_storage_ext<T>&& other)
|
||||
: pbuffer(other.pbuffer)
|
||||
, valid(other.valid)
|
||||
{
|
||||
@ -727,7 +727,7 @@ namespace etl
|
||||
/// the external buffer.
|
||||
//***************************************************************************
|
||||
template <typename... TArgs>
|
||||
reference create(TArgs&&... args) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
reference create(TArgs&&... args)
|
||||
{
|
||||
ETL_ASSERT(!has_value(), ETL_ERROR(etl::typed_storage_error));
|
||||
pointer p = ::new (pbuffer) value_type(etl::forward<TArgs>(args)...);
|
||||
@ -807,7 +807,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns a pointer of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
pointer operator->() ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
pointer operator->()
|
||||
{
|
||||
ETL_ASSERT(has_value(), ETL_ERROR(etl::typed_storage_error));
|
||||
|
||||
@ -817,7 +817,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns a const pointer of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
const_pointer operator->() const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
const_pointer operator->() const
|
||||
{
|
||||
ETL_ASSERT(has_value(), ETL_ERROR(etl::typed_storage_error));
|
||||
|
||||
@ -827,7 +827,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns reference of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
reference operator*() ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
reference operator*()
|
||||
{
|
||||
return *operator->();
|
||||
}
|
||||
@ -835,15 +835,15 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// \returns const_reference of type T and asserts if has_value() is false.
|
||||
//***************************************************************************
|
||||
const_reference operator*() const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
const_reference operator*() const
|
||||
{
|
||||
return *operator->();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typed_storage_ext(etl::typed_storage_ext<T>&) ETL_DELETE;
|
||||
typed_storage_ext& operator=(etl::typed_storage_ext<T>&) ETL_DELETE;
|
||||
typed_storage_ext(const etl::typed_storage_ext<T>&) ETL_DELETE;
|
||||
typed_storage_ext& operator=(const etl::typed_storage_ext<T>&) ETL_DELETE;
|
||||
|
||||
pointer pbuffer;
|
||||
bool valid;
|
||||
|
||||
@ -40,6 +40,9 @@ SOFTWARE.
|
||||
#include "static_assert.h"
|
||||
#include "type_traits.h"
|
||||
|
||||
#include "private/tuple_element.h"
|
||||
#include "private/tuple_size.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
///\defgroup array array
|
||||
@ -111,7 +114,7 @@ namespace etl
|
||||
/// Returns a reference to the value at index 'i'.
|
||||
///\param i The index of the element to access.
|
||||
//*************************************************************************
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 reference at(size_t i) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 reference at(size_t i)
|
||||
{
|
||||
ETL_ASSERT(i < SIZE, ETL_ERROR(array_out_of_range));
|
||||
|
||||
@ -122,7 +125,7 @@ namespace etl
|
||||
/// Returns a const reference to the value at index 'i'.
|
||||
///\param i The index of the element to access.
|
||||
//*************************************************************************
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 const_reference at(size_t i) const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 const_reference at(size_t i) const
|
||||
{
|
||||
ETL_ASSERT(i < SIZE, ETL_ERROR(array_out_of_range));
|
||||
|
||||
@ -709,7 +712,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Returns a const reference to the last element.
|
||||
//*************************************************************************
|
||||
ETL_NODISCARD ETL_CONSTEXPR const_reference back() const
|
||||
ETL_NODISCARD ETL_CONSTEXPR const_reference back() const ETL_NOEXCEPT
|
||||
{
|
||||
return *data();
|
||||
}
|
||||
@ -1053,7 +1056,13 @@ namespace etl
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_array(TValues&&... values) ETL_NOEXCEPT -> etl::array<T, sizeof...(TValues)>
|
||||
{
|
||||
return {etl::forward<T>(values)...};
|
||||
// Forward each argument as its own deduced type, then convert explicitly to T.
|
||||
// Forwarding as T (the old behaviour) made the call ill-formed for any const-qualified
|
||||
// lvalue of type T: forward<T> requires a non-const T&, and a T&& cannot bind to a
|
||||
// reference-related const lvalue. The explicit conversion also keeps narrowing
|
||||
// initialisers (e.g. make_array<char>(0, 1)) working, which plain forwarding into the
|
||||
// braced initialiser list would reject.
|
||||
return {static_cast<T>(etl::forward<TValues>(values))...};
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1063,7 +1072,7 @@ namespace etl
|
||||
///\param rhs The second array.
|
||||
//*************************************************************************
|
||||
template <typename T, const size_t SIZE>
|
||||
void swap(etl::array<T, SIZE>& lhs, etl::array<T, SIZE>& rhs)
|
||||
ETL_CONSTEXPR14 void swap(etl::array<T, SIZE>& lhs, etl::array<T, SIZE>& rhs) ETL_NOEXCEPT_FROM(ETL_OR_STD::swap(etl::declval<T&>(), etl::declval<T&>()))
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
@ -1100,7 +1109,7 @@ namespace etl
|
||||
/// second, otherwise <b>false</b>
|
||||
//*************************************************************************
|
||||
template <typename T, size_t SIZE>
|
||||
bool operator<(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
ETL_CONSTEXPR14 bool operator<(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
{
|
||||
return etl::lexicographical_compare(lhs.cbegin(), lhs.cend(), rhs.cbegin(), rhs.cend());
|
||||
}
|
||||
@ -1114,7 +1123,7 @@ namespace etl
|
||||
///< b>false</b>
|
||||
//*************************************************************************
|
||||
template <typename T, size_t SIZE>
|
||||
bool operator<=(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
ETL_CONSTEXPR14 bool operator<=(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
{
|
||||
return !(lhs > rhs);
|
||||
}
|
||||
@ -1127,7 +1136,7 @@ namespace etl
|
||||
/// the second, otherwise <b>false</b>
|
||||
template <typename T, size_t SIZE>
|
||||
//*************************************************************************
|
||||
bool operator>(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
ETL_CONSTEXPR14 bool operator>(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
{
|
||||
return (rhs < lhs);
|
||||
}
|
||||
@ -1141,7 +1150,7 @@ namespace etl
|
||||
///< b>false</b>
|
||||
//*************************************************************************
|
||||
template <typename T, size_t SIZE>
|
||||
bool operator>=(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
ETL_CONSTEXPR14 bool operator>=(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
{
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
@ -1155,7 +1164,7 @@ namespace etl
|
||||
///\return A reference to the element
|
||||
//*************************************************************************
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
inline T& get(array<T, Size>& a)
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 T& get(array<T, Size>& a) ETL_NOEXCEPT
|
||||
{
|
||||
ETL_STATIC_ASSERT(Index < Size, "Index out of bounds");
|
||||
return a[Index];
|
||||
@ -1170,11 +1179,106 @@ namespace etl
|
||||
///\return A const reference to the element
|
||||
//*************************************************************************
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
inline const T& get(const array<T, Size>& a)
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 const T& get(const array<T, Size>& a) ETL_NOEXCEPT
|
||||
{
|
||||
ETL_STATIC_ASSERT(Index < Size, "Index out of bounds");
|
||||
return a[Index];
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP11
|
||||
//*************************************************************************
|
||||
/// Gets an rvalue reference to an element in the array.
|
||||
///\tparam Index The index.
|
||||
///\tparam T The type.
|
||||
///\tparam Size The array size.
|
||||
///\param a The array.
|
||||
///\return An rvalue reference to the element
|
||||
//*************************************************************************
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 T&& get(array<T, Size>&& a) ETL_NOEXCEPT
|
||||
{
|
||||
ETL_STATIC_ASSERT(Index < Size, "Index out of bounds");
|
||||
return static_cast<T&&>(a[Index]);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a const rvalue reference to an element in the array.
|
||||
///\tparam Index The index.
|
||||
///\tparam T The type.
|
||||
///\tparam Size The array size.
|
||||
///\param a The array.
|
||||
///\return A const rvalue reference to the element
|
||||
//*************************************************************************
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
ETL_NODISCARD ETL_CONSTEXPR14 const T&& get(const array<T, Size>&& a) ETL_NOEXCEPT
|
||||
{
|
||||
ETL_STATIC_ASSERT(Index < Size, "Index out of bounds");
|
||||
return static_cast<const T&&>(a[Index]);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the number of elements in an array.
|
||||
///\tparam T The type.
|
||||
///\tparam Size The array size.
|
||||
//*************************************************************************
|
||||
template <typename T, size_t Size>
|
||||
struct tuple_size<etl::array<T, Size> > : etl::integral_constant<size_t, Size>
|
||||
{
|
||||
};
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the type of the element at Index in an array.
|
||||
///\tparam Index The index.
|
||||
///\tparam T The type.
|
||||
///\tparam Size The array size.
|
||||
//*************************************************************************
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
struct tuple_element<Index, etl::array<T, Size> >
|
||||
{
|
||||
ETL_STATIC_ASSERT(Index < Size, "Index out of bounds");
|
||||
|
||||
using type = T;
|
||||
};
|
||||
#endif
|
||||
} // namespace etl
|
||||
|
||||
#if ETL_USING_CPP11
|
||||
namespace std
|
||||
{
|
||||
// libc++ already declares std::tuple_size / std::tuple_element in its inline
|
||||
// namespace (std::__1), so re-declaring them here would make the name
|
||||
// ambiguous. Detect libc++ via _LIBCPP_VERSION and skip the forward
|
||||
// declarations in that case, even when not using the STL.
|
||||
#if ETL_NOT_USING_STL && !defined(_LIBCPP_VERSION) \
|
||||
&& !((defined(ETL_DEVELOPMENT_OS_APPLE) || (ETL_COMPILER_FULL_VERSION >= 190000) && (ETL_COMPILER_FULL_VERSION < 210000)) \
|
||||
&& defined(ETL_COMPILER_CLANG))
|
||||
template <typename T>
|
||||
struct tuple_size;
|
||||
|
||||
template <size_t Index, typename TType>
|
||||
struct tuple_element;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// Specialisation of tuple_size to allow the use of C++ structured bindings.
|
||||
//***************************************************************************
|
||||
template <typename T, size_t Size>
|
||||
struct tuple_size<etl::array<T, Size> > : etl::integral_constant<size_t, Size>
|
||||
{
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Specialisation of tuple_element to allow the use of C++ structured
|
||||
/// bindings.
|
||||
//***************************************************************************
|
||||
template <size_t Index, typename T, size_t Size>
|
||||
struct tuple_element<Index, etl::array<T, Size> >
|
||||
{
|
||||
ETL_STATIC_ASSERT(Index < Size, "Index out of bounds");
|
||||
|
||||
using type = T;
|
||||
};
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -2128,7 +2128,7 @@ namespace etl
|
||||
s = (s | (s << 2U)) & 0x33333333UL;
|
||||
s = (s | (s << 1U)) & 0x55555555UL;
|
||||
|
||||
return (f | (s << 1U));
|
||||
return static_cast<uint32_t>(f | (s << 1U));
|
||||
}
|
||||
|
||||
#if ETL_USING_64BIT_TYPES
|
||||
@ -2156,7 +2156,7 @@ namespace etl
|
||||
s = (s | (s << 2U)) & 0x3333333333333333ULL;
|
||||
s = (s | (s << 1U)) & 0x5555555555555555ULL;
|
||||
|
||||
return (f | (s << 1U));
|
||||
return static_cast<uint64_t>(f | (s << 1U));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -50,15 +50,22 @@ namespace etl
|
||||
//***************************************************************************
|
||||
template <typename TDestination, typename TSource>
|
||||
ETL_NODISCARD
|
||||
typename etl::enable_if< !(etl::is_integral<TDestination>::value && etl::is_integral<TSource>::value) && (sizeof(TDestination) == sizeof(TSource))
|
||||
&& etl::is_trivially_copyable<TSource>::value && etl::is_trivially_copyable<TDestination>::value,
|
||||
TDestination>::type bit_cast(const TSource& source) ETL_NOEXCEPT
|
||||
#if ETL_USING_BUILTIN_BIT_CAST
|
||||
ETL_CONSTEXPR14
|
||||
#endif
|
||||
typename etl::enable_if< !(etl::is_integral<TDestination>::value && etl::is_integral<TSource>::value) && (sizeof(TDestination) == sizeof(TSource))
|
||||
&& etl::is_trivially_copyable<TSource>::value && etl::is_trivially_copyable<TDestination>::value,
|
||||
TDestination>::type bit_cast(const TSource& source) ETL_NOEXCEPT
|
||||
{
|
||||
#if ETL_USING_BUILTIN_BIT_CAST
|
||||
return __builtin_bit_cast(TDestination, source);
|
||||
#else
|
||||
TDestination destination;
|
||||
|
||||
memcpy(&destination, &source, sizeof(TDestination));
|
||||
|
||||
return destination;
|
||||
#endif
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
|
||||
@ -695,7 +695,7 @@ namespace etl
|
||||
template <typename T>
|
||||
typename etl::enable_if<etl::is_integral<T>::value, bool>::type write(T value, uint_least8_t nbits = CHAR_BIT * sizeof(T))
|
||||
{
|
||||
bool success = (available(nbits) > 0U);
|
||||
bool success = (nbits > 0U) && (available(nbits) > 0U);
|
||||
|
||||
if (success)
|
||||
{
|
||||
@ -914,6 +914,7 @@ namespace etl
|
||||
template <typename T>
|
||||
void write_data(T value, uint_least8_t nbits)
|
||||
{
|
||||
ETL_ASSERT(nbits > 0U, ETL_ERROR_GENERIC("bit_stream_writer::write_data: nbits is zero"));
|
||||
ETL_ASSERT(nbits <= (CHAR_BIT * sizeof(T)), ETL_ERROR_GENERIC("bit_stream_writer::write_data: nbits too large"));
|
||||
|
||||
// Apply the byte order (endianness).
|
||||
@ -1305,6 +1306,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T read_value(uint_least8_t nbits, bool is_signed)
|
||||
{
|
||||
ETL_ASSERT(nbits > 0U, ETL_ERROR_GENERIC("bit_stream_reader::read_value: nbits is zero"));
|
||||
ETL_ASSERT(nbits <= (CHAR_BIT * sizeof(T)), ETL_ERROR_GENERIC("bit_stream_reader::read_value: nbits too large"));
|
||||
|
||||
T value = 0;
|
||||
|
||||
@ -508,6 +508,28 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
/// Construct from span.
|
||||
//***************************************************************************
|
||||
byte_stream_reader(etl::span<unsigned char> span_, etl::endian stream_endianness_)
|
||||
: pdata(reinterpret_cast<const char*>(span_.begin()))
|
||||
, pcurrent(reinterpret_cast<const char*>(span_.begin()))
|
||||
, stream_length(span_.size_bytes())
|
||||
, stream_endianness(stream_endianness_)
|
||||
{
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
/// Construct from span.
|
||||
//***************************************************************************
|
||||
byte_stream_reader(etl::span<const unsigned char> span_, etl::endian stream_endianness_)
|
||||
: pdata(reinterpret_cast<const char*>(span_.begin()))
|
||||
, pcurrent(reinterpret_cast<const char*>(span_.begin()))
|
||||
, stream_length(span_.size_bytes())
|
||||
, stream_endianness(stream_endianness_)
|
||||
{
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
/// Construct from range.
|
||||
//***************************************************************************
|
||||
|
||||
@ -508,7 +508,8 @@ namespace etl
|
||||
|
||||
//*************************************************************************
|
||||
///\brief Construct a const_map from a variadic list of elements.
|
||||
/// Static asserts if the elements are not of type <code>value_type</code>.
|
||||
/// Static asserts if the elements are not constructible into
|
||||
/// <code>value_type</code>.
|
||||
/// Static asserts if the number of elements is greater than the capacity of
|
||||
/// the const_map.
|
||||
//*************************************************************************
|
||||
@ -517,7 +518,8 @@ namespace etl
|
||||
: iconst_map<TKey, TMapped, TKeyCompare>(element_list, sizeof...(elements), Size)
|
||||
, element_list{etl::forward<TElements>(elements)...}
|
||||
{
|
||||
static_assert((etl::are_all_same<value_type, etl::decay_t<TElements>...>::value), "All elements must be value_type");
|
||||
static_assert((etl::conjunction<etl::is_constructible<value_type, etl::decay_t<TElements>>...>::value),
|
||||
"All elements must be constructible into value_type");
|
||||
static_assert(sizeof...(elements) <= Size, "Number of elements exceeds capacity");
|
||||
}
|
||||
|
||||
|
||||
@ -458,7 +458,8 @@ namespace etl
|
||||
//*************************************************************************
|
||||
///\brief Construct a const_map from a variadic list of elements.
|
||||
/// Static asserts if the element type is not constructible.
|
||||
/// Static asserts if the elements are not of type <code>value_type</code>.
|
||||
/// Static asserts if the elements are not constructible into
|
||||
/// <code>value_type</code>.
|
||||
/// Static asserts if the number of elements is greater than the capacity of
|
||||
/// the const_map.
|
||||
//*************************************************************************
|
||||
@ -467,7 +468,8 @@ namespace etl
|
||||
: iconst_multimap<TKey, TMapped, TKeyCompare>(element_list, sizeof...(elements), Size)
|
||||
, element_list{etl::forward<TElements>(elements)...}
|
||||
{
|
||||
static_assert((etl::are_all_same<value_type, etl::decay_t<TElements>...>::value), "All elements must be value_type");
|
||||
static_assert((etl::conjunction<etl::is_constructible<value_type, etl::decay_t<TElements>>...>::value),
|
||||
"All elements must be constructible into value_type");
|
||||
static_assert(sizeof...(elements) <= Size, "Number of elements exceeds capacity");
|
||||
}
|
||||
|
||||
|
||||
@ -536,7 +536,10 @@ namespace etl
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
/// Sets the count thresholds.
|
||||
///\param valid The count for a valid state.
|
||||
///\param hold The count after valid for a hold state. Default = 0.
|
||||
///\param repeat The count after hold for a key repeat. Default = 0.
|
||||
//*************************************************************************
|
||||
void set(count_t valid, count_t hold = 0, count_t repeat = 0)
|
||||
{
|
||||
|
||||
@ -2535,7 +2535,13 @@ namespace etl
|
||||
template <typename T, typename... TValues>
|
||||
constexpr auto make_deque(TValues&&... values) -> etl::deque<T, sizeof...(TValues)>
|
||||
{
|
||||
return {etl::forward<T>(values)...};
|
||||
// Forward each argument as its own deduced type, then convert explicitly to T.
|
||||
// Forwarding as T (the old behaviour) made the call ill-formed for any const-qualified
|
||||
// lvalue of type T: forward<T> requires a non-const T&, and a T&& cannot bind to a
|
||||
// reference-related const lvalue. The explicit conversion also keeps narrowing
|
||||
// initialisers (e.g. make_deque<char>(0, 1)) working, which plain forwarding into the
|
||||
// braced initialiser list would reject.
|
||||
return {static_cast<T>(etl::forward<TValues>(values))...};
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -315,13 +315,13 @@ namespace etl
|
||||
//*******************************************
|
||||
/// Copy construct from unexpected type.
|
||||
//*******************************************
|
||||
template <typename G, typename etl::enable_if< !etl::is_convertible<const G&, TError>::value, bool>::type = false>
|
||||
template <typename G, etl::enable_if_t<!etl::is_convertible<const G&, TError>::value, bool> = false>
|
||||
ETL_CONSTEXPR14 explicit expected(const etl::unexpected<G>& ue)
|
||||
: storage(etl::in_place_index_t<Error_Type>(), ue.error())
|
||||
{
|
||||
}
|
||||
|
||||
template <typename G, typename etl::enable_if< etl::is_convertible<const G&, TError>::value, bool>::type = false>
|
||||
template <typename G, etl::enable_if_t<etl::is_convertible<const G&, TError>::value, bool> = false>
|
||||
ETL_CONSTEXPR14 expected(const etl::unexpected<G>& ue)
|
||||
: storage(etl::in_place_index_t<Error_Type>(), ue.error())
|
||||
{
|
||||
@ -338,13 +338,13 @@ namespace etl
|
||||
//*******************************************
|
||||
/// Move construct from unexpected type.
|
||||
//*******************************************
|
||||
template <typename G, typename etl::enable_if< !etl::is_convertible<const G&, TError>::value, bool>::type = false>
|
||||
template <typename G, etl::enable_if_t< !etl::is_convertible<const G&, TError>::value, bool> = false>
|
||||
ETL_CONSTEXPR14 explicit expected(etl::unexpected<G>&& ue)
|
||||
: storage(etl::in_place_index_t<Error_Type>(), etl::move(ue.error()))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename G, typename etl::enable_if< etl::is_convertible<const G&, TError>::value, bool>::type = false>
|
||||
template <typename G, etl::enable_if_t<etl::is_convertible<const G&, TError>::value, bool> = false>
|
||||
ETL_CONSTEXPR14 expected(etl::unexpected<G>&& ue)
|
||||
: storage(etl::in_place_index_t<Error_Type>(), etl::move(ue.error()))
|
||||
{
|
||||
@ -746,7 +746,7 @@ namespace etl
|
||||
//*******************************************
|
||||
const value_type& operator*() const ETL_LVALUE_REF_QUALIFIER
|
||||
{
|
||||
ETL_ASSERT_OR_RETURN_VALUE(has_value(), ETL_ERROR(expected_invalid), ETL_NULLPTR);
|
||||
ETL_ASSERT(has_value(), ETL_ERROR(expected_invalid));
|
||||
|
||||
return etl::get<value_type>(storage);
|
||||
}
|
||||
@ -757,7 +757,7 @@ namespace etl
|
||||
//*******************************************
|
||||
value_type&& operator*() &&
|
||||
{
|
||||
ETL_ASSERT_OR_RETURN_VALUE(has_value(), ETL_ERROR(expected_invalid), ETL_NULLPTR);
|
||||
ETL_ASSERT(has_value(), ETL_ERROR(expected_invalid));
|
||||
|
||||
return etl::move(etl::get<value_type>(storage));
|
||||
}
|
||||
@ -807,97 +807,97 @@ namespace etl
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP11
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, TValue&>>>
|
||||
auto transform(F&& f) & -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, this_type&, U, TValue&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TValue&>>>
|
||||
auto transform(F&& f) const& -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, const this_type&, U, const TValue&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, TValue&&>>>
|
||||
auto transform(F&& f) && -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, this_type&&, U, TValue&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TValue&&>>>
|
||||
auto transform(F&& f) const&& -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, const this_type&&, U, const TValue&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, TValue&>>>
|
||||
auto and_then(F&& f) & -> U
|
||||
{
|
||||
return and_then_impl<F, this_type&, U, TValue&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TValue&>>>
|
||||
auto and_then(F&& f) const& -> U
|
||||
{
|
||||
return and_then_impl<F, const this_type&, U, const TValue&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TValue&&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, TValue&&>>>
|
||||
auto and_then(F&& f) && -> U
|
||||
{
|
||||
return and_then_impl<F, this_type&&, U, TValue&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TValue&&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TValue&&>>>
|
||||
auto and_then(F&& f) const&& -> U
|
||||
{
|
||||
return and_then_impl<F, const this_type&&, U, const TValue&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, TError&>>>
|
||||
auto or_else(F&& f) & -> U
|
||||
{
|
||||
return or_else_impl<F, this_type&, U, TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TError&>>>
|
||||
auto or_else(F&& f) const& -> U
|
||||
{
|
||||
return or_else_impl<F, const this_type&, U, const TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, TError&&>>>
|
||||
auto or_else(F&& f) && -> U
|
||||
{
|
||||
return or_else_impl<F, this_type&&, U, TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TError&&>>>
|
||||
auto or_else(F&& f) const&& -> U
|
||||
{
|
||||
return or_else_impl<F, const this_type&&, U, const TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, TError&>>>
|
||||
auto transform_error(F&& f) & -> expected<TValue, U>
|
||||
{
|
||||
return transform_error_impl<F, this_type&, U, TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TError&>>>
|
||||
auto transform_error(F&& f) const& -> expected<TValue, U>
|
||||
{
|
||||
return transform_error_impl<F, const this_type&, U, const TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, TError&&>>>
|
||||
auto transform_error(F&& f) && -> expected<TValue, U>
|
||||
{
|
||||
return transform_error_impl<F, this_type&&, U, TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t< etl::invoke_result_t<F, const TError&&>>>
|
||||
auto transform_error(F&& f) const&& -> expected<TValue, U>
|
||||
{
|
||||
return transform_error_impl<F, const this_type&&, U, const TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
@ -916,7 +916,7 @@ namespace etl
|
||||
storage_type storage;
|
||||
|
||||
#if ETL_USING_CPP11
|
||||
template < typename F, typename TExp, typename TRet, typename TValueRef, typename = typename etl::enable_if<!etl::is_void<TRet>::value>::type>
|
||||
template < typename F, typename TExp, typename TRet, typename TValueRef, typename = etl::enable_if_t<!etl::is_void<TRet>::value>>
|
||||
auto transform_impl(F&& f, TExp&& exp) const -> expected<TRet, TError>
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -929,7 +929,7 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
template < typename F, typename TExp, typename TRet, typename TValueRef, typename = typename etl::enable_if<etl::is_void<TRet>::value>::type>
|
||||
template < typename F, typename TExp, typename TRet, typename TValueRef, typename = etl::enable_if_t<etl::is_void<TRet>::value>>
|
||||
auto transform_impl(F&& f, TExp&& exp) const -> expected<void, TError>
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -944,8 +944,8 @@ namespace etl
|
||||
}
|
||||
|
||||
template < typename F, typename TExp, typename TRet, typename TValueRef,
|
||||
typename = typename etl::enable_if< !etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::error_type, TError>::value>::type>
|
||||
typename = etl::enable_if_t<!etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::error_type, TError>::value>>
|
||||
auto and_then_impl(F&& f, TExp&& exp) const -> TRet
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -959,8 +959,8 @@ namespace etl
|
||||
}
|
||||
|
||||
template < typename F, typename TExp, typename TRet, typename TErrorRef,
|
||||
typename = typename etl::enable_if< !etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::value_type, TValue>::value>::type>
|
||||
typename = etl::enable_if_t<!etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::value_type, TValue>::value>>
|
||||
auto or_else_impl(F&& f, TExp&& exp) const -> TRet
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -973,7 +973,7 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
template < typename F, typename TExp, typename TRet, typename TErrorRef, typename = typename etl::enable_if<!etl::is_void<TRet>::value>::type>
|
||||
template < typename F, typename TExp, typename TRet, typename TErrorRef, typename = etl::enable_if_t<!etl::is_void<TRet>::value>>
|
||||
auto transform_error_impl(F&& f, TExp&& exp) const -> expected<TValue, TRet>
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -1216,97 +1216,97 @@ namespace etl
|
||||
}
|
||||
|
||||
#if ETL_USING_CPP11
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto transform(F&& f) & -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, this_type&, U>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto transform(F&& f) const& -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, const this_type&, U>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto transform(F&& f) && -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, this_type&&, U>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto transform(F&& f) const&& -> expected<U, TError>
|
||||
{
|
||||
return transform_impl<F, const this_type&&, U>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto and_then(F&& f) & -> U
|
||||
{
|
||||
return and_then_impl<F, this_type&, U>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto and_then(F&& f) const& -> U
|
||||
{
|
||||
return and_then_impl<F, const this_type&, U>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto and_then(F&& f) && -> U
|
||||
{
|
||||
return and_then_impl<F, this_type&&, U>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F>>>
|
||||
auto and_then(F&& f) const&& -> U
|
||||
{
|
||||
return and_then_impl<F, const this_type&&, U>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, TError&>>>
|
||||
auto or_else(F&& f) & -> U
|
||||
{
|
||||
return or_else_impl<F, this_type&, U, TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, const TError&>>>
|
||||
auto or_else(F&& f) const& -> U
|
||||
{
|
||||
return or_else_impl<F, const this_type&, U, const TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, TError&&>>>
|
||||
auto or_else(F&& f) && -> U
|
||||
{
|
||||
return or_else_impl<F, this_type&&, U, TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, const TError&&>>>
|
||||
auto or_else(F&& f) const&& -> U
|
||||
{
|
||||
return or_else_impl<F, const this_type&&, U, const TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, TError&>>>
|
||||
auto transform_error(F&& f) & -> expected<void, U>
|
||||
{
|
||||
return transform_error_impl<F, this_type&, U, TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, const TError&>>>
|
||||
auto transform_error(F&& f) const& -> expected<void, U>
|
||||
{
|
||||
return transform_error_impl<F, const this_type&, U, const TError&>(etl::forward<F>(f), *this);
|
||||
}
|
||||
|
||||
template <typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, TError&&>::type>::type>
|
||||
template <typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, TError&&>>>
|
||||
auto transform_error(F&& f) && -> expected<void, U>
|
||||
{
|
||||
return transform_error_impl<F, this_type&&, U, TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
}
|
||||
|
||||
template < typename F, typename U = typename etl::remove_cvref< typename etl::invoke_result<F, void, const TError&&>::type>::type>
|
||||
template < typename F, typename U = etl::remove_cvref_t<etl::invoke_result_t<F, const TError&&>>>
|
||||
auto transform_error(F&& f) const&& -> expected<void, U>
|
||||
{
|
||||
return transform_error_impl<F, const this_type&&, U, const TError&&>(etl::forward<F>(f), etl::move(*this));
|
||||
@ -1324,7 +1324,7 @@ namespace etl
|
||||
etl::variant<etl::monostate, error_type> storage;
|
||||
|
||||
#if ETL_USING_CPP11
|
||||
template < typename F, typename TExp, typename TRet, typename = typename etl::enable_if<!etl::is_void<TRet>::value>::type>
|
||||
template < typename F, typename TExp, typename TRet, typename = etl::enable_if_t<!etl::is_void<TRet>::value>>
|
||||
auto transform_impl(F&& f, TExp&& exp) const -> expected<TRet, TError>
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -1337,7 +1337,7 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
template < typename F, typename TExp, typename TRet, typename = typename etl::enable_if<etl::is_void<TRet>::value>::type>
|
||||
template < typename F, typename TExp, typename TRet, typename = etl::enable_if_t<etl::is_void<TRet>::value>>
|
||||
auto transform_impl(F&& f, TExp&& exp) const -> expected<void, TError>
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -1352,8 +1352,8 @@ namespace etl
|
||||
}
|
||||
|
||||
template < typename F, typename TExp, typename TRet,
|
||||
typename = typename etl::enable_if< !etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::error_type, TError>::value>::type>
|
||||
typename = etl::enable_if_t< !etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::error_type, TError>::value>>
|
||||
auto and_then_impl(F&& f, TExp&& exp) const -> TRet
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -1367,8 +1367,8 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename F, typename TExp, typename TRet, typename TErrorRef,
|
||||
typename = typename etl::enable_if< !etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::value_type, void>::value>::type>
|
||||
typename = etl::enable_if_t< !etl::is_void<TRet>::value && etl::is_expected<TRet>::value
|
||||
&& etl::is_same<typename TRet::value_type, void>::value>>
|
||||
auto or_else_impl(F&& f, TExp&& exp) const -> TRet
|
||||
{
|
||||
if (exp.has_value())
|
||||
@ -1381,7 +1381,7 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
template < typename F, typename TExp, typename TRet, typename TErrorRef, typename = typename etl::enable_if<!etl::is_void<TRet>::value>::type>
|
||||
template < typename F, typename TExp, typename TRet, typename TErrorRef, typename = etl::enable_if_t<!etl::is_void<TRet>::value>>
|
||||
auto transform_error_impl(F&& f, TExp&& exp) const -> expected<void, TRet>
|
||||
{
|
||||
if (exp.has_value())
|
||||
|
||||
@ -91,44 +91,70 @@ namespace etl
|
||||
POINTER // const void*
|
||||
};
|
||||
|
||||
// Map a type to its category. Decays and removes cv-qualifiers.
|
||||
// Trait mapping a type (with references and cv-qualifiers removed) to its type_category.
|
||||
//
|
||||
// NOTE: signed char/unsigned char (typically int8_t/uint8_t) are NOT
|
||||
// categorised as CHAR here - only plain 'char' gets character semantics.
|
||||
// signed/unsigned char are formatted as integers, matching basic_format_arg
|
||||
// storage and std::format's formatter<signed char>/<unsigned char>. This is
|
||||
// enforced structurally: the INTEGER partial specialisation is constrained
|
||||
// with is_integral<T> && !is_same<T, bool> && !is_same<T, char>, so
|
||||
// signed/unsigned char (is_integral == true) fall into INTEGER while the
|
||||
// dedicated bool/char full specialisations take priority for those exact types.
|
||||
template <class T, class = void>
|
||||
struct type_category_trait
|
||||
{
|
||||
static constexpr type_category value = type_category::NONE; // unknown type: custom formatter, be permissive
|
||||
};
|
||||
|
||||
template <>
|
||||
struct type_category_trait<bool>
|
||||
{
|
||||
static constexpr type_category value = type_category::BOOLEAN;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct type_category_trait<char>
|
||||
{
|
||||
static constexpr type_category value = type_category::CHAR;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct type_category_trait<
|
||||
T, typename etl::enable_if<etl::is_integral<T>::value && !etl::is_same<T, bool>::value && !etl::is_same<T, char>::value>::type>
|
||||
{
|
||||
static constexpr type_category value = type_category::INTEGER;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct type_category_trait<T, typename etl::enable_if<etl::is_floating_point<T>::value>::type>
|
||||
{
|
||||
static constexpr type_category value = type_category::FLOAT;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct type_category_trait<T,
|
||||
typename etl::enable_if<etl::is_same<T, char*>::value || etl::is_same<T, const char*>::value
|
||||
|| etl::is_same<T, etl::string_view>::value || etl::is_base_of<etl::istring, T>::value>::type>
|
||||
{
|
||||
static constexpr type_category value = type_category::STRING;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct type_category_trait<
|
||||
T, typename etl::enable_if<etl::is_pointer<T>::value && !etl::is_same<T, char*>::value && !etl::is_same<T, const char*>::value>::type>
|
||||
{
|
||||
static constexpr type_category value = type_category::POINTER;
|
||||
};
|
||||
|
||||
// Map a type to its category. Removes references and cv-qualifiers, then defers
|
||||
// entirely to the type_category_trait specialisations above.
|
||||
template <class T>
|
||||
constexpr type_category get_type_category()
|
||||
{
|
||||
using U = typename etl::remove_cv<typename etl::remove_reference<T>::type>::type;
|
||||
|
||||
// Order matters: bool before integral, char before integral
|
||||
if (etl::is_same<U, bool>::value)
|
||||
return type_category::BOOLEAN;
|
||||
if (etl::is_same<U, char>::value)
|
||||
return type_category::CHAR;
|
||||
if (etl::is_same<U, signed char>::value)
|
||||
return type_category::CHAR;
|
||||
if (etl::is_same<U, unsigned char>::value)
|
||||
return type_category::CHAR;
|
||||
if (etl::is_integral<U>::value)
|
||||
return type_category::INTEGER;
|
||||
if (etl::is_same<U, float>::value)
|
||||
return type_category::FLOAT;
|
||||
if (etl::is_same<U, double>::value)
|
||||
return type_category::FLOAT;
|
||||
if (etl::is_same<U, long double>::value)
|
||||
return type_category::FLOAT;
|
||||
if (etl::is_same<U, const char*>::value)
|
||||
return type_category::STRING;
|
||||
if (etl::is_same<U, char*>::value)
|
||||
return type_category::STRING;
|
||||
if (etl::is_same<U, etl::string_view>::value)
|
||||
return type_category::STRING;
|
||||
if (etl::is_base_of<etl::istring, U>::value)
|
||||
return type_category::STRING;
|
||||
if (etl::is_pointer<U>::value)
|
||||
return type_category::POINTER;
|
||||
if (etl::is_same<U, const void*>::value)
|
||||
return type_category::POINTER;
|
||||
if (etl::is_same<U, void*>::value)
|
||||
return type_category::POINTER;
|
||||
return type_category::NONE; // unknown type: custom formatter, be permissive
|
||||
return type_category_trait<U>::value;
|
||||
}
|
||||
|
||||
// Check if a format type character is valid for a given type category.
|
||||
@ -727,13 +753,16 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
// int8_t / uint8_t are typically defined as signed char / unsigned char, but
|
||||
// (unlike plain char) they are formatted as integers by default, matching
|
||||
// std::format's formatter<signed char>/formatter<unsigned char> behaviour.
|
||||
basic_format_arg(const signed char v)
|
||||
: data(static_cast<char>(v))
|
||||
: data(static_cast<int>(v))
|
||||
{
|
||||
}
|
||||
|
||||
basic_format_arg(const unsigned char v)
|
||||
: data(static_cast<char>(v))
|
||||
: data(static_cast<unsigned int>(v))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -2219,7 +2219,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
|
||||
template <typename... T>
|
||||
constexpr auto make_list(T... t) -> etl::list<typename etl::common_type_t<T...>, sizeof...(T)>
|
||||
constexpr auto make_list(T&&... t) -> etl::list<typename etl::common_type_t<T...>, sizeof...(T)>
|
||||
{
|
||||
return {etl::forward<T>(t)...};
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
not_null_exception(string_type reason_, string_type file_name_, numeric_type line_number_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
not_null_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
|
||||
: exception(reason_, file_name_, line_number_)
|
||||
{
|
||||
}
|
||||
@ -59,7 +59,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
not_null_contains_null(string_type file_name_, numeric_type line_number_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
not_null_contains_null(string_type file_name_, numeric_type line_number_)
|
||||
: not_null_exception(ETL_ERROR_TEXT("not_null:contains null", ETL_NOT_NULL_FILE_ID"A"), file_name_, line_number_)
|
||||
{
|
||||
}
|
||||
@ -92,7 +92,7 @@ namespace etl
|
||||
/// Constructs a not_null from a pointer.
|
||||
/// Asserts if the pointer is null.
|
||||
//*********************************
|
||||
ETL_CONSTEXPR14 explicit not_null(underlying_type ptr_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
ETL_CONSTEXPR14 explicit not_null(underlying_type ptr_)
|
||||
: ptr(ptr_)
|
||||
{
|
||||
ETL_ASSERT(ptr_ != ETL_NULLPTR, ETL_ERROR(not_null_contains_null));
|
||||
@ -110,7 +110,7 @@ namespace etl
|
||||
/// Assignment from a pointer.
|
||||
/// Asserts if the pointer is null.
|
||||
//*********************************
|
||||
ETL_CONSTEXPR14 not_null& operator=(underlying_type rhs) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
ETL_CONSTEXPR14 not_null& operator=(underlying_type rhs)
|
||||
{
|
||||
ETL_ASSERT_OR_RETURN_VALUE(rhs != ETL_NULLPTR, ETL_ERROR(not_null_contains_null), *this);
|
||||
|
||||
@ -193,7 +193,7 @@ namespace etl
|
||||
/// Asserts if the unique_ptr contains null.
|
||||
/// Moves from the unique_ptr.
|
||||
//*********************************
|
||||
ETL_CONSTEXPR14 explicit not_null(underlying_type&& u_ptr_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
ETL_CONSTEXPR14 explicit not_null(underlying_type&& u_ptr_)
|
||||
: u_ptr(etl::move(u_ptr_))
|
||||
{
|
||||
ETL_ASSERT(u_ptr.get() != ETL_NULLPTR, ETL_ERROR(not_null_contains_null));
|
||||
@ -204,7 +204,7 @@ namespace etl
|
||||
/// Asserts if the unique_ptr contains null.
|
||||
/// Moves from the unique_ptr.
|
||||
//*********************************
|
||||
ETL_CONSTEXPR14 not_null& operator=(underlying_type&& rhs) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
|
||||
ETL_CONSTEXPR14 not_null& operator=(underlying_type&& rhs)
|
||||
{
|
||||
ETL_ASSERT_OR_RETURN_VALUE(rhs.get() != ETL_NULLPTR, ETL_ERROR(not_null_contains_null), *this);
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ namespace etl
|
||||
|
||||
// Convertible to any type of null non-member pointer.
|
||||
template <class T>
|
||||
operator T*() const
|
||||
ETL_CONSTEXPR operator T*() const ETL_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -74,7 +74,7 @@ namespace etl
|
||||
/// A null option.
|
||||
///\ingroup utilities
|
||||
//*****************************************************************************
|
||||
const nullopt_t nullopt = {};
|
||||
ETL_INLINE_VAR ETL_CONSTANT nullopt_t nullopt = {};
|
||||
|
||||
//***************************************************************************
|
||||
/// Exception for optional.
|
||||
|
||||
@ -524,6 +524,20 @@ SOFTWARE.
|
||||
#define ETL_INDETERMINATE
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// inline
|
||||
#if ETL_USING_GCC_COMPILER || ETL_USING_CLANG_COMPILER
|
||||
#define ETL_NO_INLINE __attribute__((noinline))
|
||||
#define ETL_ALWAYS_INLINE __attribute__((always_inline))
|
||||
#elif ETL_USING_MICROSOFT_COMPILER
|
||||
#define ETL_NO_INLINE __declspec(noinline)
|
||||
#define ETL_ALWAYS_INLINE __forceinline
|
||||
#else
|
||||
// will trigger a compilation error if used
|
||||
#define ETL_NO_INLINE unsupported compiler
|
||||
#define ETL_ALWAYS_INLINE unsupported compiler
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Determine if the ETL can use char8_t type.
|
||||
#if ETL_NO_SMALL_CHAR_SUPPORT
|
||||
|
||||
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