Ubuntu 26.04 is not available in github workflows directly and won't be soon.
But ubuntu-26.04 is available as docker container. So use it for running
C++26 workflows which were disabled previously.
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Remove unused reinstall-cmake.sh
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Activate -O3 in CI builds for C++23
For good coverage of potential warnings triggered by -O3, activate
it for:
* .github/workflows/clang-c++23.yml
* .github/workflows/gcc-c++23.yml
So additionally necessary CPU resources are limited.
* Use Ubuntu-24.04 to test C++23
---------
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Add concept invocable and further missing concepts to concepts.h
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Keep comparison and swap free functions out of the global namespace and
let ADL do its thing.
* Apply the same global to etl namespace move on overlooked functions
---------
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Add begin() and end() to etl::expected
* Adding error_or() to etl::expected
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Fix missing tuple_size
In case of certain clang versions, a wrong combination of activated
and deactivated template forward declarations and specializations
were provided.
This led to redefinition errors and specialization errors.
Now aligning those combinations, and providing definitions from
<utility> from std in the STL using case.
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Swap can be part of the etl namespace and let ADL do its thing
---------
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Move operators for etl::unique_ptr to etl namespace
This is in accordance with the operators of std::unique_ptr. Also,
it doesn't pollute the global namespace, and also works together
with ADL, finding the operators in the etl namespace now.
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Expected actually doesn't require a monostate.
* Better naming, since uninitialised isn't an option for expected.
---------
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Make etl::optional, etl::variant and etl::vector methods noexcept
Adding type traits supporting the respective conditional noexcept
Fix missing etl::move() in etl::optional move constructors
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Run generator_test.py in CI checks
* Remove running generator.bat in CI checks
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Fix delegate not being cleared by assigning empty braces
Fixes issue #1399.
The non-capturing lambda support (PR#1295) added a non-explicit
delegate(function_ptr) constructor and operator=(function_ptr). This
caused `delegate = {}` to implicitly convert `{}` to a null function
pointer and bind it via function_ptr_stub, leaving the delegate
appearing valid (stub != nullptr) but invoking through a null pointer
(undefined behavior).
Fix:
- Mark delegate(function_ptr) constructor explicit to prevent implicit
conversion from `{}` during initialization.
- In operator=(function_ptr), clear the delegate when fp is null
instead of binding a null pointer through function_ptr_stub.
Added tests verifying that both `delegate d = {}` and `d = {}` produce
an invalid (cleared) delegate.
* Fix Dockerfile for powerpc cross build
Debian snapshot sources were mixed with plain sid sources which
mismatched after a while. Now, aligning all sources from snapshot
server.
* Print test names at test time (#1343)
* Fix operator| conflict with std::ranges (#1395)
* Actually use ETL_USE_BUILTIN_MEM_FUNCTIONS to decide about macro definitions
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Includes C++26 related infrastructure macros.
Fixes compile errors when compiling under C++26.
Initially supported C++26 features:
- [[indeterminate]]
- new 2022 ISO prefixes in ratio.h
- atomic fetch_max() and fetch_min()
- is_virtual_base_of
- is_trivially_relocatable and trivially_relocate
- saturation arithmetic: add_sat, sub_sat, mul_sat, div_sat, saturate_cast
* Add development tools to docker image
python3-cogapp, clang-format, treefmt
Add script to run development environment in docker container
Document docker use in docs/docker.md
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Extensions for testing
Generalize run-tests.sh
Test all C++ versions at once
Fix combination of big endian and -Wsign-conversion
Failed on s390x (as reference for big endian)
Add github workflow for s390x
Add armhf container files
Devcontainers for i386 and riscv
Add github workflows for armhf, i386 and riscv64
Add run-tests.sh for foreign architectures
Document testing in doc/testing.md
Adjustments from clang-format run
Fix .devcontainer/s390x/Dockerfile for linebreak syntax
Fix exit code of run-test.sh
Previously, "exit $?" was used, actually the return value of
FailedCompilation and FailedTest which are always 0.
Now just using 1.
In run-tests.sh at ctest, use -V for printing number of tests unconditionally
While ctest suppresses individual test list by default, it didn't even
print the number of tests anymore, as run_tests.sh does because
it suppresses it output completely.
Now, by default print number of tests, and in verbose mode, print test list
in addition.
* Support powerpc as foreign architecture
* Add SFINAE constraints to etl::begin/end and reverse iterator free functions
The unconstrained etl::begin(), etl::end(), etl::cbegin(), etl::cend(),
etl::rbegin(), etl::rend(), etl::crbegin(), and etl::crend() templates
in the no-STL code path were matching iterator types during ADL, causing
a hard error with GCC 15's std::ranges::begin. When std::ranges performed
ADL on an etl::*::iterator, it found etl::begin() as a candidate; since
the iterator type has a nested iterator typedef, the return type TContainer::iterator
was valid, but calling .begin() on the iterator failed.
Fix: add etl::void_t<decltype(...)> SFINAE guards to each template,
ensuring they only participate in overload resolution when TContainer
actually has the corresponding member function (.begin(), .end(), etc.).
* - Fix red unit tests on 32 bits big-endian platform.
* Document powerpc architecture for testing
* Use Dockerfiles in cross testing github workflows
Synchronizes environment setup for github workflows to what is
defined in the development Dockerfiles. So they don't need to
be maintained separately.
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: Sergei Shirokov <sergej.shirokov@gmail.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Fix run-syntax-checks.sh to run with bash
Contains bash specific syntax, and sync with the other *.sh files
in this directory.
* Add missing header file adaptors to the directory and CMakeLists.txt
* run-syntax-checks.sh without ETL_IN_UNIT_TEST
* Fix usage of make_unsigned
* Removing crc.h from syntax checks because of redundancy
* Remove ETL_USING_CPP11 from unit tests
Unit tests are always run with at least C++11.
* Add missing copyright header in test_manchester.cpp
* Fixed usage of ETL_DEPRECATED_REASON(), wrong syntax by order
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Suppress false positive compiler warnings when compiling with -O3
The CI checks currently only check everything with -O0. Wenn activating
higher optimization levels, more warnings kick in. Leading to errors,
depending on the configuration.
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix chrono.h year_month_weekday_last and year_month_weekday sysdays()
Bug 1: year_month_weekday_last::operator sys_days() — wrong weekday construction
The code was constructing a weekday from a raw day count using weekday(unsigned),
which treats the value as a weekday encoding (0–6). The fix uses weekday(sys_days),
which correctly accounts for the epoch being a Thursday (+4 offset).
Bug 2: year_month_weekday::operator sys_days() — same wrong weekday
construction + off-by-one in day_of_month
Same weekday(unsigned) vs weekday(sys_days) issue. Additionally, the day_of_month
calculation was missing the 1 + base — it computed a 0-based offset from day 1,
but forgot to add the 1 back when converting to an actual day number.
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix coverage workflow for action version
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Fix broken syntax from clang-format reformat
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Rename _current to _current_it in ranges.h
Resolves conflict with _current macro from Zephyr and improves
self-explanation of variable.
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Print test names at test time (#1343)
* Modified closure to accept the callback type as a template parameter
* Modified closure to accept the callback type as a template parameter
* Applied clang-format
* Fixed C++03 compatibility
* Fixed C++03 compatibility
# Conflicts:
# include/etl/closure.h
---------
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
* Print test names at test time (#1343)
* Document etl::format_to and etl::print
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
* Print test names at test time (#1343)
* Fix initializer_list use in algorithm.h
Needs to be conditional.
* Move definition of data() in iterator.h
Needs to be defined earlier.
---------
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
* Print test names at test time (#1343)
* Rename 'leaf' to 'child' in intrusive_links.h
Recent versions of the Tasking TriCore compiler treat
'leaf' as a reserved C++ keyword, causing compilation failures in ETL.
---------
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: Maksim Danilov <maksim.danilov@accenture.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>