From 06552b7bed1d8abb68a43d12aa22c723944c6ba0 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 24 Jun 2026 17:02:09 +0100 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit e6a7642121b4bd34ee96e0edce26f4c071bfe495 Author: Drew Rife Date: Wed Jun 24 11:51:02 2026 -0400 Add constexpr support for delegate construction and assignment (#1476) * feat: Add constexpr support for delegate construction and assignment in C++14 and C++20 * docs: add more docstring coverage #1473 * docs: note constexpr availability for function-pointer overloads Update docs/callbacks/delegate.md to reflect the new ETL_CONSTEXPR14 annotations on delegate(function_ptr) and create(function_ptr), and add a paragraph to the Constexpr section explaining which function-pointer APIs are usable in constant expressions at C++14 vs C++20. #1473 --------- Co-authored-by: Roland Reichwein commit 05010aebf8107413097f599bb931cdcbc9d3f5c9 Author: Roland Reichwein Date: Wed Jun 24 14:39:06 2026 +0200 Fix ranges (#1475) * Fix etl::get to preserve reference members for tuple rvalues The rvalue-qualified overloads of etl::get (both the index-based and type-based forms) unconditionally applied etl::move to the stored element. For a tuple holding a reference member (e.g. etl::tuple), this cast the referenced object to an rvalue instead of returning the stored lvalue reference, diverging from std::get and failing to compile when the result was bound to a non-const lvalue reference. Forward the element with static_cast instead, so that reference members collapse to an lvalue reference while value members are still moved. This is required to support tuples of references such as those produced by the zip, enumerate and adjacent views. * Make ranges views return non-const references to make them mutable * Support type-changing transform_view * Fix join_with_iterator reference type to match operator* join_with_iterator declared reference = inner_trait::reference (e.g. int&) while operator* returns value_type by value. For prvalue-yielding inner ranges (e.g. repeat_view from a type-changing transform) the declared reference was inconsistent with the actual dereference. Derive value_type from the inner iterator's dereference and set reference = value_type, preserving by-value semantics. Add regression test for transform|join_with with prvalue inner ranges. * Make join_with conform to [range.join.with.iterator] using inner/pattern common reference * Clang-format * Fix owning_view const begin()/end() by making _r mutable so chunk_view compiles over rvalue ranges commit 1d5e9ea67f3b14238d473cc613c52f03a9475b52 Author: Roland Reichwein Date: Wed Jun 24 13:37:46 2026 +0200 Remove file writing tests for etl::random (#1474) Some ETL random tests write to files but don't CHECK() anything. Since they are left at the file system and were only used during development, they can be removed now. commit 5e5012c62c0467e73217ed59636d716761662237 Author: Roland Reichwein Date: Wed Jun 24 11:27:53 2026 +0200 Format user defined types in format.h (#1470) Co-authored-by: John Wellbelove commit 8f4373e5554cdfda488b4a7048bf9661bedb8e28 Author: John Wellbelove Date: Tue Jun 23 18:12:58 2026 +0100 Documentation updates (#1469) Co-authored-by: John Wellbelove commit d598337107fadd60ded4eb967d596e9cb362386e Author: Roland Reichwein Date: Tue Jun 23 19:11:17 2026 +0200 Fix code examples in documentation (#1471) commit 4e11bc9d54a733c655beeb1f19d48c32a268c5dc Author: John Wellbelove Date: Tue Jun 23 18:04:26 2026 +0100 SFTP the documentation to the website on push to master (#1468) * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Workflow for deploying documentation * Removed mention of 'SCP' * Added final newline * Removed old script * Test alternative 'copy docs to website' job. * Updated to burnett01/rsync-deployments@8.0.5 as 7.0.2 is deprecated * Removed test branch from the 'push' list --------- Co-authored-by: John Wellbelove commit 2dabc42cbb7b320d3972b38d061c4bd50f5b5b23 Author: John Wellbelove Date: Sat Jun 20 10:27:20 2026 +0100 Add etl::stable partition (#1466) * Added two versions of etl::stable_partition One is O(N) time , O(N) space The other is O(Nlog(N)) time * Added partition_move * Updates to tests and documentation * Review changes * std::size -> sizeof * etl::size -> ETL_OR_STL::size * Changed index array typer to std::array --------- Co-authored-by: John Wellbelove commit 55429eddd2ca155bb7016e7e2e2bf76a3ebe13b6 Author: John Wellbelove Date: Sat Jun 20 10:26:03 2026 +0100 Only enable the assign and insert member functions for class ivector<… (#1467) * Only enable the assign and insert member functions for class ivector & class ivector when the value_type the iterator references is a pointer to T. * Imporoved enable_if for assign and insert. * clang-format * std::void_t -> etl::void_t * Made enable_if condition into a common class struct --------- Co-authored-by: John Wellbelove commit 04b7004110a2a916d85c69a03c22c36f0a44990d Author: Roland Reichwein Date: Sat Jun 20 10:57:06 2026 +0200 Add emplace() to etl::map and further containers (#1462) commit 6df8842a210a57fc6cedb6e545dd463aaab460ab Author: Timon Zijnge <47081647+tzijnge@users.noreply.github.com> Date: Thu Jun 18 12:29:38 2026 +0200 #1461 Invalid version detected with CMake FetchContent from URL (#1465) * Bold project documentation link in README * #1461 Invalid version detected when used with CMake FetchContent from URL * Reject a .git dir that belongs to a parent project, e.g. when fetched as a URL tarball with no .git of its own * Update documentation on including ETL in another project with CMake's FetchContent --------- Co-authored-by: John Wellbelove Co-authored-by: tzijnge commit c6d17b3a8d55c1bc8989a99e28f29dfad4a88685 Author: John Wellbelove Date: Thu Jun 18 10:35:20 2026 +0100 Fixes and additional metafunctions for etl::type_list (#1460) * New metafunctions for type_list * clang-format changes * Corrections from review * Removed commented out code --------- Co-authored-by: John Wellbelove commit c32f9cc862e4f3762e96895f78f890001eac00f2 Author: Roland Reichwein Date: Wed Jun 17 13:31:53 2026 +0200 Fix using libc++ (#1463) Before, libstdc++ was used in both gcc and clang builds. Fix includes an adjustment to consider in NO_STL case. Now build with libc++ in separate github workflows with clang. commit 20cab3225691a9782f422ad1ad132f3f8ce5cf8a Author: Roland Reichwein Date: Sat Jun 13 11:00:39 2026 +0200 Make ipriority_queue non-sized base class (#1459) * Fix iterator access algorithm.h Move from operator[] access to operator+ and operator- to prevent limited compatibility. This worked before for vector because of iterators being ptrdiff_t (signed), but not for unsigned access like size_t as in etl::queue. * Make ipriority_queue non-sized base class Fixes issue #1457 --------- Co-authored-by: John Wellbelove commit 6d9ed143b28a72170e94b5e6a3cee278ef3d62dc Author: Roland Reichwein Date: Fri Jun 12 09:04:24 2026 +0200 Add etl::infinite_loop (#1458) commit 4f9618d8df434b9d9768965925f4d231755b5aec Author: Christoph Rüthing Date: Mon Jun 8 16:23:35 2026 +0200 Make Constructors of Atomics for trivial Types constexpr (#1453) * Bold project documentation link in README * Add constexpr to trivial Atomics According to https://en.cppreference.com/cpp/atomic/atomic/atomic the constructors of atomics should be constexpr. This change marks (at least for the trivial types) the constructor as constexpr. --------- Co-authored-by: John Wellbelove Co-authored-by: Roland Reichwein commit 1ca5bb012fd155ac0d3ddfaafeeba5578059c9a2 Author: John Wellbelove Date: Mon Jun 8 14:16:52 2026 +0100 to string() does not handle floating point number with integer part exceeding max uint64 t (#1455) * Added 'scientific' flag to basic_format_spec to allow forcing of scientific format for all floating point values. * Forces floating point numbers that are larger than than the internal integral workspace types to be formatted in scientific format. Also allows scientific format to be forced for all floating point output. NAN and INF outputs now follow case settings, as does the new scientific exponent letter. 'e' or 'E'. * treefmt changes * Quick fixes * Removed * Added tests for NAN and INF Fixed result for -INF * Added tests for upper and lower case scintific format. * Changed incorrect stream header from to * Update test_to_string.cpp * Update test_to_u16string.cpp * Update test_to_u32string.cpp * Update test_to_u8string.cpp * Update test_to_wstring.cpp * clang-format updates * clang-format updates * Re-coded the precision calculation in add_floating_point_scientific to match add_floating_point_non_scientific * Rename step 1 * Fix: rename docs/Messaging to docs/messaging * Rename step 1 * Fix: rename docs/Messaging to docs/messaging * Rename step 1 * Fix: rename docs/Messaging to docs/messaging * Changed incorrect stream header from to * Update test_to_string.cpp * clang-format updates # Conflicts: # test/test_to_string.cpp * Remove old docs folder * clang-format updates # Conflicts: # test/test_to_string.cpp * Re-commit missing file --------- Co-authored-by: John Wellbelove commit 9b56ffe676f5e9b3c5056745778049800ac33c8a Author: John Wellbelove Date: Mon Jun 8 11:16:22 2026 +0100 Fix: rename docs/Messaging to docs/messaging commit b969b2c46c28b871db76f2c9ee6c8e27abb83427 Author: John Wellbelove Date: Mon Jun 8 11:16:02 2026 +0100 Rename step 1 commit b3ade470b0c7d013137ad88400b7ade30d53a176 Author: John Wellbelove Date: Mon Jun 8 11:05:31 2026 +0100 Fix: rename docs/Messaging to docs/messaging commit 9907ab3b684a7c617525e1df198c1fae00522e62 Author: John Wellbelove Date: Mon Jun 8 11:04:58 2026 +0100 Rename step 1 commit 12792e418f7f6e08f8bb4d9dd24eafe6c5730c21 Author: John Wellbelove Date: Mon Jun 8 10:42:41 2026 +0100 Fix: rename docs/Messaging to docs/messaging commit f383184b0e6b3e7b3737fa37da1a16cf4e15b982 Author: John Wellbelove Date: Mon Jun 8 10:42:10 2026 +0100 Rename step 1 commit eed3d0b7b00a5be6222e663550d14fa66af96f45 Author: John Wellbelove Date: Mon Jun 8 08:58:47 2026 +0100 Hotfix/documentation updates (#1456) * message_router and fsm documentation corrections * message_router and fsm documentation corrections * message_router and fsm documentation corrections * Delete docs/Messaging/message-router.md The folder is no longer valid. --------- Co-authored-by: John Wellbelove commit 4a88884b3972aad9495713ec9902323c1986ab9c Author: John Wellbelove Date: Sat Jun 6 13:12:44 2026 +0100 Issue/add hugo support for documentation (#1449) * Add ranges * Initial Hugo setup * Work in progress * Added selection for local or remote site * Updated to 'light' theme * Changed to using Hextra Hugo theme * Changed to using Hextra Hugo theme * Changed to Hextra Hugo theme * Change to Hextra Hugo theme * Updated Hugo setup. * Updated Hugo setup. # Conflicts: # docs/releases/_index.md * Work in progress * Added new fonts Added new documentation * Latest documentation updates * Latest documentation updates # Conflicts: # docs/containers/array.md # docs/containers/array_view.md # docs/containers/array_wrapper.md # docs/containers/bip_buffer_spsc_atomic.md # docs/containers/bitset.md # docs/containers/indirect_vector.md # docs/containers/vector.md # docs/getting-started/compilers.md * Added bloom_filter markdown doc * Added more documentation Updated CSS for light and dark modes * Fixed some menus Added mode documentation files * Updated CSS rules Added badges to home page Added uniqur_ptr + pool tutorial * Fixed formatting on the home page markdown Modified light amd dark code formatting * Updated unique_ptr-with-pool * Added container and shared message tutorials * Updates to documentation * Added const_multimap * Updated source-formatting.md * Added initial raw text files form Web site editor * Innore coverage build directory * Exported raw text documentation files from the web site editor * Hugo updates * Added Hugo intalation and markdown descriptions * More addition to the documentation * Added closure.md and updates to delegate.md * Added format.md * Added documentation for etl::delegate_observable, etl::function, Base64 codec * Added io_port documentation * Added basic_format_spec * Added documentation for string_stream and string utilities. * Added more documentation Updated the documentation CSS * Added documentation for clocks, day, duration * Added more documentation for chrono classes Updated callouts * More chrono documentation * Completed chrono documentation * Maths functions documentation * Completed maths documentation * Completed maths documentation * Completed maths documentation * Completed maths documentation * Added multiple documentation files * Added iterator.md * Added debug_count.md and versions.md * Added debug_count.md and versions.md * Added more documentation * More documentation * Added some design pattern documentation Modified some of the layout files Modified the About documentation * Converted more documentation pages Modified the site CSS * Added more documentation Moced some documentation files to new directories * Added more documentation Tweaks to CSS * Added callback_timer_deferred_locked documentation * Added callback_timer_locked documentation * More documentation updates * More documentation updates * More documentation updates * New documentation files. Harmonised file name format * New documentation files. * Multiple document updates * Multiple document updates * Final conversion of web pages * Updates before PR * Updates before PR * Updates before PR # Conflicts: # docs/blog/_index.md * Final pre PR updates * Updates to message framework documentation * Renamed directory * Fix spelling * Added author and date to blog files Moved documentation files merged from development * Fixed 'Description' typo * Fix typos # Conflicts: # docs/IO/io_port.md # docs/containers/sets/const-multiset.md # docs/containers/sets/const-set.md # docs/maths/correlation.md # docs/maths/gamma.md * Renamed two files to lower case * Minor renaming * Added author and date * Updated callout on bresenham_line.md Added support for showing the ETL version on the documentation first page, by copying the version.txt file as a hugo asset. Updated the Python 'update_release.py' to copy 'version.txt' * Replace space in filename with hyphen. Added more information to hugo-commands.md * Replace space in filename with hyphen. Added more information to hugo-commands.md # Conflicts: # docs/getting-started/view-the-docs-locally/hugo-commands.md * Added a link to pseudo_moving_average.md * Updated title pages for groups * Fixed missing 404 for non-existent pages * Fixed coordinate variable names in the 'Calculating the intersection' example --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit 42a21a92e86908267022230ade61ced8224c982b Author: Roland Reichwein Date: Thu Jun 4 23:34:59 2026 +0200 Fix copy and move in signal.h (#1454) * Fix copy and move in signal.h * Delete copy and move in callback_service.h The implicitly provided copy and move copied internal pointers which are invalid after copying. * Delete copy and move in delegate_service.h The implicitly provided copy and move copied internal pointers which are invalid after copying. commit e379c1354383dc937df10ddf2e7d4463a27114b0 Merge: 7e782b85 2d7ddb05 Author: John Wellbelove Date: Mon Jun 1 11:34:59 2026 +0100 Merge branch 'serges147/master' into development # Conflicts: # include/etl/intrusive_avl_tree.h commit 7e782b850db1dd4de78dc1dc8522fac19daeaaa2 Author: John Wellbelove Date: Mon Jun 1 11:32:10 2026 +0100 Added documentation deploy action to www.etlcpp.com commit 8a782cc7f121b9c60db59b325a0802c1f14191d8 Author: Roland Reichwein Date: Sun May 31 20:32:38 2026 +0200 Add more constexpr to constructors (#1450) * Add more constexpr to ctors * Adjust operator!=() in fixed_iterator.h Instead of taking an iterator by reference, take it by value as done in the other operators and overloads. * Initialize move_iterator() current member Prevent indeterminate values * Fix fixed_iterator::operator* return type fixed_iterator::operator* returned value_type by value, so writes like *it = ... modified a temporary rather than the underlying location. This broke the iterator’s intended use (e.g., writing to a fixed register/memory location). Now returning iterator_traits::reference instead (const and non-const overloads). * Fixed move_iterator::operator+= and operator-= return type move_iterator::operator+= / operator-= returned by value, but RandomAccessIterator requirements (and std::move_iterator) expect these to return move_iterator&. Returning by value also added an unnecessary copy and could break generic code expecting reference semantics. commit e3fad3c908ddbbb0838820ab178415589f5d2dc2 Author: Sergei Date: Sun May 31 11:49:55 2026 +0300 Add etl::intrusive_avl_tree class. (#1425) * Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * Added etl::intrusive_avl_tree class. * PR review minor fixes. * Fix `std::move` -> `etl::move` * Apply AI spell checking * Try to fix C++03 build. --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit af3944acdbb0ee05245f973056d77a536c2ce1ec Author: Roland Reichwein Date: Tue May 26 10:11:24 2026 +0200 Fix iterator_traits: make SFINAE-friendly for iterators without nested typedefs (#1447) The primary etl::iterator_traits template previously required all five nested typedefs (iterator_category, value_type, difference_type, pointer, reference) to exist, causing hard compilation errors with iterators like std::common_iterator or ranges::common_iterator. Changes: 1. Make primary template SFINAE-friendly: split into an empty primary template and a void_t-guarded partial specialization that only activates when all nested typedefs are present. 2. Add explicit std::common_iterator specialization (C++20/STL): a partial specialization that delegates to std::iterator_traits>. 3. Fall through to std::iterator_traits: the empty primary template inherits from std::iterator_traits when building with STL and C++20, so any iterator with a std::iterator_traits specialization works automatically. 4. Remove iterator_traits dependency from etl::vector: assign() now uses decltype(*first) for the type-compatibility static assert, and insert() uses ptrdiff_t directly instead of querying iterator_traits::difference_type. commit 9765cbf7643ea2f49e16441847296bba7aab2aa0 Author: Roland Reichwein Date: Tue May 26 05:19:42 2026 +0200 Fix format: float zero-padding, nested replacement width, octal alternate form, and extreme doubles (#1442) format.h: - Fix float zero-padding ({:010f}): output sign first, then zero-fill, then the unsigned formatted value, matching std::format behavior. - Fix nested replacement fields ({:{}d}): consume the value's auto-index in parse_format_spec before parsing nested width/precision fields, so auto-indexing order matches the C++ standard. - Fix {:#o} with value 0: produce "0" instead of "00" by skipping the octal prefix when the value is zero. - Fix format_floating_default overflow for extreme doubles (DBL_MIN, DBL_MAX): fall back to scientific notation for values >= 1e18 or tiny positives < 1e-6, delegating to format_floating_e. - Fix format_floating_e precision loss: replace iterative multiply-by-10 normalization loop with O(1) log10/pow/floor computation. - Add resolve_nested_replacements helper to extract width/precision from format args at formatting time. test_format.cpp: - Add tests for float zero-padding, nested replacement width, octal alternate form with zero, float sign/width/alignment, negative floats, scientific notation for large/small values, default-to-scientific switch, positive zero, brace escaping, and integer limits. format.h + platform.h: - log10l fix for different toolchain support: Define ETL_FORMAT_NO_LONG_DOUBLE_MATH in the profile if libm doesn't provide log10l. This is identified by linker error missing this symbol. It was identified with the llvm/clang cross toolchain for ARM. commit 41174ed7f6eedc0be4bbfdebc021453af7785df7 Author: Roland Reichwein Date: Tue May 26 05:18:27 2026 +0200 Add missing constexpr to intrusive_links.h constructors (#1446) commit 6bb9841dae6b8101a936b885c9577b9dfde88224 Author: SamHalvoe <46531812+SamHalvoe@users.noreply.github.com> Date: Mon May 25 21:47:34 2026 +0200 added Pico and additional Teensy defines (#1444) * Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * added Pico and additional Teensy defines * fix format --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove Co-authored-by: SamHalvoe Co-authored-by: John Wellbelove commit 652034603b060e1af990a61b5266d5876da21fe4 Author: Roland Reichwein Date: Mon May 18 09:01:17 2026 +0200 Add test/run-clang-tidy.sh (#1409) * Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * Add test/run-clang-tidy.sh Also, add .clang-tidy configuration file. In test/syntax_check/CMakeLists.txt, make ETL headers non-system headers. Added .github/workflow/clang-tidy.yaml. Does not break the build for now on clang-tidy findings/warnings. Fix syntax issues Those issues were uncovered by making ETL headers non-system headers in test/syntax_checks/CMakeLists.txt * Fix macro syntax --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit 373247e5c15e4342502848fd2175decbafc58895 Author: Roland Reichwein Date: Mon May 18 08:14:26 2026 +0200 Make etl::variant capable for ROM placement and optimize runtime size (#1441) Via an variadic_union, the internal storage is adjusted to be able to be constexpr. commit eba472fa3a69471d7366dfdb694361f36899a580 Author: Roland Reichwein Date: Tue May 12 21:02:32 2026 +0200 Simplify and fix test/run-syntax-checks.sh (#1432) commit 57d386769472f99ea4f63e2573ef9de0cad27f72 Author: Roland Reichwein Date: Sat May 9 10:29:18 2026 +0200 Fix the case of using STL without pthreads but with mutexes (#1433) * Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * Fix the case of using STL without pthreads but with mutexes On non-POSIX targets in STL mode, std::mutex is included from mutex.h but will probably miss pthreads. Instead, other implementations might be detected and used in mutex.h. Therefore, adding ETL_NO_STD_MUTEX as a profile option for ETL. Further, removing unnecessary includes from queue headers. --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit f6f145c5e5ecdd43789df510d4fe8b5c7c9ac3e1 Author: Sergei Date: Fri May 8 11:33:21 2026 +0300 Apply the rule of zero for `etl::optional` type. (#1426) * Apply the rule of zero for `etl::optional` type. Correct move behavior of `TestDataM` - it should preserve `valid` value. Implemented overloads of `etl::make_optional` free function. Extend optional moveable tests - fundamental vs non-fundamental - move construct/assign from valueless - Verify nothrow of `etl::swap` for `etl::optional`. * coderabbitai review fixes. --------- Co-authored-by: John Wellbelove commit 079b3345d9f2e0b6048e40e9e0735dcef119ec04 Author: Roland Reichwein Date: Wed May 6 19:26:10 2026 +0200 Various bugfixes (#1428) Co-authored-by: John Wellbelove commit c9198d089c96e66f0547e9b91914d62d8e43838f Author: Roland Reichwein Date: Wed May 6 11:16:20 2026 +0200 Add format checks at compile time to format.h (#1419) * Add format checks at compile time to format.h * format.h: Refactor padding calculation * format.h: Code cleanup commit a5d279d5e450732af3a7a23c35f7ed648d419ad3 Author: Roland Reichwein Date: Wed May 6 11:13:02 2026 +0200 Fix sanitizer use (#1429) * Fix sanitizer use A case issue prevented adding sanitizer in the tests. * Fix compiler warnings from actual sanitizer use commit fe17d32e9bcbfabcb25cc4d00a810bcd8527e8c4 Author: Roland Reichwein Date: Wed May 6 11:10:14 2026 +0200 Fix meson build (#1431) Co-authored-by: John Wellbelove commit e8206cca83d2525bc054507d0efc218dfe6d951d Author: Roland Reichwein Date: Wed May 6 10:10:10 2026 +0200 Remove unnecessary includes (#1434) Co-authored-by: John Wellbelove commit fdfd17a1c2d7259ed5c9093b354fe5fd31fad92b Author: John Wellbelove Date: Wed Apr 8 15:30:53 2026 +0100 Added missing format and print headers from VS2022 project commit 4f411c66a92298bb4dfd1ab6b1d02d97af8453bb Author: Roland Reichwein Date: Sun May 3 22:49:02 2026 +0200 Remove dead code (#1427) Removing private class members, code unused by ETL in "private" namespaces, code unreachable via preprocessor guards (C++11 inside C++03). For code still to be kept, even though unused at first sight, add tests. commit 2d7ddb056cab70dd3d04bb01e9f85681db63af80 Author: Sergei Shirokov Date: Sat May 2 17:25:23 2026 +0300 PR review minor fixes. commit 1ea8473fe149c946a9bb4de8d668ce1b03c81177 Author: Sergei Shirokov Date: Fri Feb 6 18:08:11 2026 +0200 Added etl::intrusive_avl_tree class. commit b9b36d81557bb256292935780a5d34f1de060e57 Author: Roland Reichwein Date: Thu Apr 30 12:30:01 2026 +0200 Add bazel support (#1420) * Add bazel support * Add github workflow for bazel commit a2e274bbc5cfd4220f6899307473ff80756420d7 Author: Roland Reichwein Date: Thu Apr 30 12:27:12 2026 +0200 Run C++26 workflows with docker (#1421) 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. commit d1fe2938e196df4668d0c59888b4ec7a36f39c2f Author: Roland Reichwein Date: Wed Apr 29 10:11:02 2026 +0200 Remove unused reinstall-cmake.sh (#1422) * Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * Remove unused reinstall-cmake.sh --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit a1cd6a5569afab04439a5c0e20b4786fb1a04bec Author: Roland Reichwein Date: Wed Apr 29 09:33:56 2026 +0200 Activate -O3 in CI builds for C++23 (#1415) * 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 commit 943e8e60891aacf37e0dfd29badaf44b50ccaba2 Author: Roland Reichwein Date: Tue Apr 28 15:35:21 2026 +0200 Add invocable and further missing concepts to concepts.h (#1412) * 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 Co-authored-by: John Wellbelove commit 15ca12649e9273f6243cf69183038b4fff63fa38 Author: Joris Putcuyps Date: Tue Apr 28 14:13:55 2026 +0200 Global namespace bitset free functions cleanup (#1411) * 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 Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit ee0d4740b3a27aaefbcd6b8e6960080202836d4b Author: Roland Reichwein Date: Tue Apr 28 11:43:54 2026 +0200 Add begin() and end() to etl::expected (#1410) * 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 Co-authored-by: John Wellbelove commit fe7b2da10cabfad4aa2f0808b36fc6c60224301b Author: Roland Reichwein Date: Tue Apr 28 11:03:25 2026 +0200 Fix missing tuple_size (#1407) * 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 from std in the STL using case. --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit 5ccbc6fbff06f523c44fbc563681a0a9fe28a93f Author: Joris Putcuyps Date: Tue Apr 28 10:23:52 2026 +0200 Swap can be part of the etl namespace and let ADL do its thing (#1414) * 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 Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit ff772d4bd15ede7574088ac8e844ed509ef1f8aa Author: Roland Reichwein Date: Tue Apr 28 09:57:21 2026 +0200 Move operators for etl::unique_ptr to etl namespace (#1408) * 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 Co-authored-by: John Wellbelove commit 43e97b7f3cdcb0aefbeff4934ab746b9594941c9 Author: Joris Putcuyps Date: Tue Apr 28 09:30:23 2026 +0200 Expected actually doesn't require a monostate. (#1413) * 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 Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit b96c2a9ecd5e38d946af21d4e990ee87e817d87a Author: Roland Reichwein Date: Mon Apr 27 22:49:39 2026 +0200 Consolidate Dockerfile non-root user to vscode (#1417) Previously, we had differently named default users in the containers. commit fbd738db691c41804cee60ffe87e5f94528c3fa3 Author: Roland Reichwein Date: Wed Apr 22 13:28:47 2026 +0200 Replace deprecated builtin __is_trivially_relocatable if possible (#1402) Fixes: #1400 commit a97817010ec436327e3b28110f7e9f40823e02c2 Author: Roland Reichwein Date: Wed Apr 22 12:37:53 2026 +0200 Make etl::variant and etl::vector methods noexcept (#1383) * 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 Co-authored-by: John Wellbelove commit 2b1dec0e7976b2d6cdaae42853e01abd3b45f7ef Author: Roland Reichwein Date: Wed Apr 22 11:31:51 2026 +0200 Run generator_test.py in CI checks (#1376) * 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 Co-authored-by: John Wellbelove commit b860326b267832dc5b21e853f9bb4948b92d7dc4 Author: Roland Reichwein Date: Tue Apr 21 15:27:43 2026 +0200 Fix delegate not being cleared by assigning empty braces (#1401) * 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. commit bbf74c5334ed6812f50b9f674b4b7e15bc8e36d9 Author: Roland Reichwein Date: Sun Apr 19 13:19:53 2026 +0200 Optimize formatting in format.h for float values (#1379) When formatting float, fix the -0.0 case format.h float format: Fix rounding issues on all platforms commit ff65c753d6a7218e296c49e007af38424236a535 Author: Roland Reichwein Date: Sat Apr 18 17:13:43 2026 +0200 Actually use ETL_USE_BUILTIN_MEM_FUNCTIONS to decide about macro defi… (#1398) * 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 Co-authored-by: John Wellbelove commit 5dc682b7ffec0fad9285b9ec6f0967019386d4ee Author: Roland Reichwein Date: Wed Apr 15 15:53:29 2026 +0200 Support for C++26 (#1375) 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 commit f858b8a72ddff1f16d6481f543bc4ccf8e177bbb Author: Roland Reichwein Date: Wed Apr 15 11:27:57 2026 +0200 Add installed dependencies for docker, documentation (#1377) * 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 Co-authored-by: John Wellbelove commit 866c8a315ed87c1319f96fa31bfeccd0c4728ab9 Author: Roland Reichwein Date: Wed Apr 15 10:47:52 2026 +0200 Extensions for testing (#1380) * 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 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 Co-authored-by: Sergei Shirokov Co-authored-by: John Wellbelove commit 17799452d26f4dd534974aac54c5e441896becb1 Author: Roland Reichwein Date: Wed Apr 15 10:09:28 2026 +0200 Add missing syntax checks (#1381) * 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 Co-authored-by: John Wellbelove commit 29d0cfec7cdc14481a9cced4bcf7dc661398af55 Author: Roland Reichwein Date: Tue Apr 14 12:38:59 2026 +0200 Suppress false positive compiler warnings when compiling with -O3 (#1389) * 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 Co-authored-by: John Wellbelove commit f258fe4af8672d50baece68288f827f60d653514 Author: Roland Reichwein Date: Tue Apr 14 11:56:05 2026 +0200 Fix operator| conflict with std::ranges (#1395) commit 3e4d41ca57de475f4b769320308e80a103c8f5d6 Author: Roland Reichwein Date: Tue Apr 14 11:56:05 2026 +0200 Fix operator| conflict with std::ranges (#1395) commit b14f70698f5ff309bfc49e25f96fd95beaaf0320 Author: Roland Reichwein Date: Tue Apr 14 11:48:03 2026 +0200 Fix chrono.h year_month_weekday_last and year_month_weekday sysdays() (#1396) * 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 Co-authored-by: John Wellbelove commit beeb4cf462b748cb890fd4b9abff75bb0a981ede Author: Roland Reichwein Date: Sat Apr 11 10:38:39 2026 +0200 Fix coverage workflow for action version (#1384) * Print test names at test time (#1343) * Fix coverage workflow for action version --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit f118c2807afcfdc31d2e95a35624070a8afe1faf Author: Roland Reichwein Date: Sat Apr 11 10:16:03 2026 +0200 Fix broken syntax from clang-format reformat (#1385) * Print test names at test time (#1343) * Fix broken syntax from clang-format reformat --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit ae6ca929c1d1936dd3d8127cd66e7c75988f51d0 Author: Roland Reichwein Date: Sat Apr 11 10:10:17 2026 +0200 Rename _current to _current_it in ranges.h (#1387) * 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 Co-authored-by: John Wellbelove commit 7971824914eb58c21868d9cf43c8b019b1c46418 Author: John Wellbelove Date: Thu Apr 9 07:21:19 2026 +0100 Add the ability to specify the callback type to etl closure (#1393) * 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 Co-authored-by: John Wellbelove commit 8dc0301a6747945c263c5c5cfa678eee9f4c5edc Author: Roland Reichwein Date: Wed Apr 8 17:58:12 2026 +0200 Document etl::format_to and etl::print (#1378) * Print test names at test time (#1343) * Document etl::format_to and etl::print --------- Co-authored-by: John Wellbelove commit 912e22f238b707edc4d47d830f61f922cea79d70 Merge: 654e222b 1a6762d6 Author: John Wellbelove Date: Sun Apr 5 14:32:40 2026 +0100 Merge branch 'development' commit 1a6762d6c38dc12bf6c84884e0ccb650706e5c1f Author: John Wellbelove Date: Sun Apr 5 14:13:22 2026 +0100 Updated version and release notes commit ee04aa76c5aa66345096483f8abc014c14a29d1f Author: John Wellbelove Date: Sun Apr 5 14:03:25 2026 +0100 VS2022 project update commit 3cd03fcb7f1c59fb27582e3e8ce744440bf5c092 Author: Roland Reichwein Date: Sun Apr 5 14:37:15 2026 +0200 Fix initializer_list use in algorithm.h and definition of data() in iterator.h (#1374) * 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 commit 654e222bd9374d5404d5886cf746b8a276f3746e Merge: 22ee7691 a1ad1336 Author: John Wellbelove Date: Sat Apr 4 10:50:06 2026 +0100 Merge branch 'development' commit a1ad13364e9e48717beb766cb77f8c946b00c385 Author: John Wellbelove Date: Sat Apr 4 10:49:00 2026 +0100 Updated release notes commit 22ee76914d7999f4605f93a1651e55016383570d Merge: a0c98662 e2bed928 Author: John Wellbelove Date: Sat Apr 4 10:02:24 2026 +0100 Merge branch 'development' # Conflicts: # test/main.cpp commit e2bed928146fe4392fa8f02c8a058527829240d7 Author: John Wellbelove Date: Sat Apr 4 09:40:46 2026 +0100 Updated version and release notes commit 576b03f38db24bc7c1284667b4790296d6670dbe Author: John Wellbelove Date: Sat Apr 4 00:14:49 2026 +0100 Merged from local copy of PR1295 commit f7e1384a70b17705fd7f531fd2e6298f47ee9002 Author: John Wellbelove Date: Fri Apr 3 20:09:06 2026 +0100 Merge development commit e61589ebf207eb3ac8c15b5ba8a34429a6b983d3 Merge: 1ce3deb0 823f2493 Author: John Wellbelove Date: Fri Apr 3 20:08:41 2026 +0100 Merge branch 'development' into delegate-from-non-capturing-lambda # Conflicts: # include/etl/private/delegate_cpp11.h # test/test_delegate.cpp commit 823f2493b440f09c051800061be1747a3657bd79 Author: Maksim Danilov Date: Fri Apr 3 18:35:41 2026 +0200 Rename 'leaf' to 'child' in intrusive_links.h (#1373) * 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 Co-authored-by: Maksim Danilov Co-authored-by: John Wellbelove commit 982adecca4e52281ea5289e6979a0760ea67ec77 Author: John Wellbelove Date: Fri Apr 3 16:55:18 2026 +0100 Added manually triggered clang-format action # Conflicts: # .github/workflows/clang-format_update.yaml commit 2059c5b657e87b0a3e9ae47c3e1a7e8ff4dfca17 Author: John Wellbelove Date: Fri Apr 3 16:46:42 2026 +0100 Added manually triggered clang-format action # Conflicts: # .github/workflows/clang-format_update.yaml commit bd6e55b12e350b87a41c4342d35779b6cf9aa92e Author: John Wellbelove Date: Fri Apr 3 16:35:57 2026 +0100 Added manually triggered clang-format action # Conflicts: # .github/workflows/clang-format_update.yaml commit 5a7674b6372a0ee33e2e7f73d68c395273ba2c35 Author: John Wellbelove Date: Fri Apr 3 16:35:57 2026 +0100 Added manually triggered clang-format action # Conflicts: # .github/workflows/clang-format_update.yaml commit 2e74b07dffca347b9fd2c79eff3fc854686a3b47 Author: John Wellbelove Date: Fri Apr 3 16:35:57 2026 +0100 Added manually triggered clang-format action commit f5128a39fe6c7696c0808a94110585315369c90f Author: John Wellbelove Date: Fri Apr 3 13:58:19 2026 +0100 Attempt to fix syntax that comfuse clang-format commit 01066b86ae8577c57dfcc816e3b0ad470571e3f9 Author: John Wellbelove Date: Fri Apr 3 10:45:54 2026 +0100 Attempt to fix syntax that comfuse clang-format commit aeb8e4f73442bcd757e1680c16e8dcecd42b006e Author: John Wellbelove Date: Thu Apr 2 14:11:45 2026 +0100 Formatted source files commit c7571660bd0ea3abbd88d2e0355f3df5820d07b8 Author: John Wellbelove Date: Thu Apr 2 14:07:10 2026 +0100 Adjusted ColumnLimit to 150 commit 6a1585b3178021ff453f9067a08f7fafeea60406 Author: John Wellbelove Date: Thu Apr 2 12:28:16 2026 +0100 Improved include regex commit 9fba468dc2970bbf25f874a3b93a11e13d3b3e01 Author: John Wellbelove Date: Thu Apr 2 11:33:44 2026 +0100 Removed ETL_DEPRECATED_REASON=[[deprecated(%0)]] from configuration commit bd1def8b413288372127f28c9d7a773ceb78f62d Author: John Wellbelove Date: Thu Apr 2 10:35:49 2026 +0100 Used the correct macro for 'if constexpr' commit 27d284713a051c60b4457601bec9226083334040 Author: John Wellbelove Date: Thu Apr 2 09:25:06 2026 +0100 Updated .clang-format to include more ETL macros commit 1405bf65ded081a3fa159f0db36b6ac772ab1810 Author: John Wellbelove Date: Thu Apr 2 08:26:17 2026 +0100 Updated .treefmt to exclude more files and directories commit 09dd40d4dd91e5817e1f8769c99bcc90e265e3de Author: Roland Reichwein Date: Wed Apr 1 22:43:04 2026 +0200 Fix .clang-format to recognize ETL macros as attributes commit c536a39f0a10e826bc2fc4c4d8e73f56a00212b4 Author: Roland Reichwein Date: Wed Apr 1 17:53:29 2026 +0200 Treefmt config commit 9b394b8677c4765091af729a50a9e3ec1e5a97fa Author: John Wellbelove Date: Wed Apr 1 17:34:15 2026 +0100 Added certain Hugo files and diectories to the Git ignore file commit 9d2c73793d8467c459a0eb0152ee46df85d4849d Author: John Wellbelove Date: Wed Apr 1 13:33:18 2026 +0100 Ran clang-format on generated files, using the .clang-format from PR #1314 commit 1ce3deb0f79f08ec7dc6b07ccc674aa293666b3f Author: Benedek Kupper Date: Tue Mar 31 21:56:42 2026 +0200 test: delegate: add unary + to convert lambda to function pointer commit ea397ec2ddc4b2e0f3e0aeb8b3244f1ae1ef748b Author: John Wellbelove Date: Tue Mar 31 11:23:49 2026 +0100 Changed non-capturing lambda API to runtime function pointer API commit a483eb90c470b25ea1e3f990e9fd97e448e1bdc6 Author: John Wellbelove Date: Tue Mar 31 19:11:02 2026 +0100 Fixed generator_test.py Updated generator files in the VS2022 project Adde licence headers to the generator headers commit c970fa9bad1af14e8dacf86e5ac81daba189beca Author: Diogo Cavaleiro Date: Wed Feb 25 11:48:06 2026 +0000 Add clang-format v18 workflow and configuration commit d17c0297ec0202fcbd04fd3b4b7250f1df14abb3 Author: Roland Reichwein Date: Tue Mar 31 17:36:54 2026 +0200 Factor out generated code (#1369) Previously, generator code under include/etl/generators needed to be synchronized with the generated files under include/etl explicitly. Leading to errors in the CI checks if forgotten. This change separates out the generated parts to cpp03 specific snippets. This way, most code under include/etl is now directly editable, with only some pre-C++11 code separated out to include/etl/generators/*_cpp03_generator.h which still needs to be re-generated on respective changes. But in many cases, this is not necessary. Co-authored-by: John Wellbelove commit 3c2a4d48a9fa86bce603020b81dd152c122c874b Author: William Sciaroni Date: Tue Mar 31 06:20:31 2026 -0500 Update Dockerfile and Devcontainer. (#1360) * Print test names at test time (#1343) * Remove python3-cogapp from Dockerfile Removed python3-cogapp from the Dockerfile installation. * Update .devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Change base image and update Python package installation * Change container to use cpp devcontainer version 2 * Point to specific version of the devcontainer * Update devcontainer to use debian snapshot for reproducability * Fetch sources via https * Make devcontainer more robust for debian_snapshot * Make fetch non-https for snapshot * Install CMake from apt * Update devcontainers to remove CMake version * Change Clang version from 22 to 21 * Apply suggestion from @rolandreichweinbmw --------- Co-authored-by: Roland Reichwein Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: John Wellbelove commit 3d564d68b9b849a4d334932d334fb8280ef3f0e6 Author: John Wellbelove Date: Mon Mar 30 19:34:15 2026 +0100 Fixed sign conversion in advance_helper commit e4dfb6c045f0cb7176f3a01c5fe3f2c809d7f22a Author: John Wellbelove Date: Mon Mar 30 19:06:07 2026 +0100 Fixed iterator.h #if #else #endif Fixed type_lookup_generator to match genereted commit 95c9cabc1002f0ec80b8aa97445ab2365dc2c5df Author: John Wellbelove Date: Sat Mar 28 20:37:03 2026 +0000 Fix for PR 1367 commit 3638d89f8b99cde27b7c793c513d6f4da1ba45fd Author: John Wellbelove Date: Sat Mar 28 13:50:27 2026 +0000 Fix for PR 1367 commit 03ca3c817ee17deb179a754af54a81a7f3d7cd0b Author: John Wellbelove Date: Sat Mar 28 12:03:12 2026 +0000 Fix for PR 1367 commit b83cef566836b5e84463f50df9e14003fc71884c Author: Roland Reichwein Date: Sat Mar 28 12:15:56 2026 +0100 Fix compilation with -Wsign-conversion (#1367) * Fix compilation with -Wsign-conversion For tests with GCC and Clang Fixes https://github.com/ETLCPP/etl/issues/632 * Fix support of negative Id in type_lookup.h: type_from_id * Fix element access arithmetic in atomic_gcc_sync.h fetch_add/fetch_sub * Fix rounded_integral_division.h: divide_round_half_odd(): direction is always 1 commit 2c2ce9a39f1bbe1d37948e97c8e4173a0c076442 Author: Bram Meijer <48760013+Brambovich@users.noreply.github.com> Date: Sat Mar 28 10:16:00 2026 +0100 Add a inplace_function constructor from a nullptr (#1336) * Add a inplace_function constructor with a nullptr argument * Add unit test for nullptr construction --------- Co-authored-by: John Wellbelove commit f718c54396fe0446f0f483a89b3e35d33f691b4c Author: Daniel Santos Date: Fri Mar 27 10:17:56 2026 +0000 Add bounds and empty checks to container classes (#1334) * add bounds and empty checks to containers * address code rabbit review * correct C++11 constexpr error * rename new constexpr macro and make it global * rename queue specializations' exceptions * change front() implementation in locked queue specializations * refactor usage of CONSTEXPR and NO_EXCEPT * expand intrusive queue tests * introduce lock guards on locked queues * Print test names at test time (#1343) * revert mutex and return changes on locking queues * finish reverting the locked queues --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove commit 12cdbc0da02e84a94a66ead292f34093356d92ea Author: Roland Reichwein Date: Fri Mar 27 10:19:50 2026 +0100 Bug fixes in variant_variadic.h (#1358) * Print test names at test time (#1343) * Bug fixes in variant_variadic.h --------- Co-authored-by: John Wellbelove commit ab03ea114fa59bc9ace96e5f75063da0e1bd8be5 Author: Bram Meijer <48760013+Brambovich@users.noreply.github.com> Date: Fri Mar 27 09:11:45 2026 +0100 Fix compilation issue when including etl/chrono next to etl/to_string. (#1365) * Print test names at test time (#1343) * Fix namespace issue of floor/round in to_string_helper --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove commit 2f242e37f219cb784ffc8ee3ef7da0f8784708c1 Author: Roland Reichwein Date: Thu Mar 26 10:46:20 2026 +0100 Restrict etl::atomic for general types (#1359) * Print test names at test time (#1343) * Restrict etl::atomic for general types Needs adding is_copy_assignable and is_move_assignable, and adjustments to is_trivially_copyable and is_assignable * Resolve mutable T value vs. volatile qualified methods * Remove volatile method overloads They are deprecated in C++20 because they don't work as users expect anyway. MSVC hinted for this. --------- Co-authored-by: John Wellbelove commit 31b87b541989bbd7da8e11c1cc0ce8f477115c8d Author: Roland Reichwein Date: Thu Mar 26 09:56:17 2026 +0100 Add C++ ranges library for C++17 (#1316) * Add ranges * Print test names at test time (#1343) * Fix conflit commit errors * Cast return value of operator* to value_type Fixed warning on VS2022 --------- Co-authored-by: John Wellbelove commit add42b6c875420882944d7e946dc22a1ecea9e25 Author: Roland Reichwein Date: Thu Mar 26 09:29:05 2026 +0100 Mark uninitialized use from std library (#1349) * Print test names at test time (#1343) * Mark uninitialized use from std library Similar to other cases, adds compiler pragmas against warnings caused by std library in optimized builds of tests --------- Co-authored-by: John Wellbelove commit 2f6a3e04aa8e043054f29502c5dcc52669f952cb Author: Timon Zijnge <47081647+tzijnge@users.noreply.github.com> Date: Thu Mar 26 08:56:50 2026 +0100 Manchester big endian support (#1353) * manchester * Added manchester code and test * manchester * Formatting and added missing file * manchester * Some functions can only be constexpr since C++14 * manchester * Manchester decode and some refactoring * manchester * Added some missing typenames * manchester * constexpr void function not allowed in C++11 * manchester * condition on static_assert tests * manchester * revert CMakeLists.txt * Using ETL_STATIC_ASSERT * Some cleanup * manchester * Added static_assert message * manchester * Added compile time tests * manchester * Added invert manchester * Some refactoring * manchester * Disable test for now * Move ETL_NODISCARD before static * manchester * Test for valid_span * manchester * Remove redundant (?) storage specifiers for template specializations. Storage specifier already given in base template * manchester * refactoring to get rid of specialized template functions in template class * manchester * cleanup * manchester * Added documentation comments * Some refactoring * manchester * introducing namespace detail_manchester * manchester * Some refactoring * Update tests * manchester * Some refactoring * Removed possible undefined behavior by refactoring encode_span * constexpr version of encode_span * Static assertion for rare case where code doesn't work because CHAR_BIT is not the same as the number of bits in uint_least8_t * manchester * renamed valid to is_valid * manchester * renamed is_valid_span to is_valid * Using etl exceptions in ETL_ASSERT * manchester * Removed _fast functions * merged encode_in_place with encode and decode_in_place with decode * removed _span to create normal overloads of encode and decode for span * Some renaming and minor refactoring * manchester * Fix build issues * manchester * Conditionally compile manchester_decoded * Update test_manchester.cpp Removed redundant semicolon * #1258 Manchester coding * Formatting * consistency: hex literals with lower case 0x * #1258 Manchester coding * Moved copyright to top of file * Make constexpr encode/decode span functions equal for little and big endian platforms * #1258 Manchester coding * Added missing include * Added missing 8bit/64bit guards * Fixed is_valid for big endian platforms * #1258 Manchester coding * private memcpy alias * #1258 Manchester coding * Review comments * #1258 Manchester coding * Cleanup * Fix build error * #1258 Manchester coding * Add manchester documentation * #1258 Manchester coding * Preparation for GitHub pages * #1324 Manchester documentation * Some small fixes * Print test names at test time (#1343) * IGN-280 biphasic amplitude as float * Add big-endian devcontainer * manchester * fixed the configuration to work with GitHub Codespaces. The changes use cross-compilation with QEMU emulation instead of trying to use a native s390x container. * manchester * Made manchester work for big-endian * Some updates to the container * Manchester big-endian support * Cleanup * Manchester big-endian support * add sourcedirectory * Enable running with ctest * Manchester big-endian support * Update documentation * Manchester big-endian support * QA * Manchester big-endian support * QA * Enable testing with ctest with cross-compiler (#5) * Enable testing with ctest and with cross-compiler * Clean up includes in manchester.h --------- Co-authored-by: Timon Zijnge --------- Co-authored-by: Timon Zijnge Co-authored-by: Roland Reichwein commit d5fc8d0cd16d32d1cdf3354a8fd4ccd96929a238 Author: Roland Reichwein Date: Wed Mar 25 21:48:41 2026 +0100 Add code coverage report (#1357) * Print test names at test time (#1343) * Add code coverage report commit 7fdea7f7ae970380ab5541b973a8aaea37297676 Author: Roland Reichwein Date: Wed Mar 25 20:28:12 2026 +0100 Adjustments in tuple.h from review (#1350) * Print test names at test time (#1343) * Adjustments in tuple.h from review --------- Co-authored-by: John Wellbelove commit e7107b24f12c26ad0305a9f5c9bd904a965f4e08 Author: Roland Reichwein Date: Wed Mar 25 13:47:03 2026 +0100 Fix tests on big endian (#1356) * Print test names at test time (#1343) * Fix tests on big endian --------- Co-authored-by: John Wellbelove commit 66e3d83a815e67a835b038daac11e69acaf93ebb Author: Roland Reichwein Date: Wed Mar 25 13:16:36 2026 +0100 Fix ETL_HAS_CONSTEXPR_ENDIANESS in unaligned_type.h (#1361) * Print test names at test time (#1343) * Fix ETL_HAS_CONSTEXPR_ENDIANESS in unaligned_type.h --------- Co-authored-by: John Wellbelove commit bd15e4244018c162c84de8d70105d181f09ee8e5 Author: Roland Reichwein Date: Wed Mar 25 09:14:33 2026 +0100 Fix etl::optional for deleted copy constructors (#1362) * Print test names at test time (#1343) * Fix etl::optional for deleted copy constructors --------- Co-authored-by: John Wellbelove commit 0b5621e8091929aaf3f83ffe99cdb7462f1b36df Author: Roland Reichwein Date: Wed Mar 25 08:54:18 2026 +0100 Fix span size type (#1363) * Print test names at test time (#1343) * Fix span size type size() returned a signed value while declared (unsigned) size_t. --------- Co-authored-by: John Wellbelove commit fa3ac745589295f89d73baa4b71be67bf45ac06f Author: Roland Reichwein Date: Mon Mar 23 20:51:30 2026 +0100 Limit clock duration to milliseconds type on narrow int type (#1364) * Print test names at test time (#1343) * Limit clock duration to milliseconds type on narrow int type On AVR, for 16 bit int types, nano and micro are not provided. Now, consistently use them only conditionally. --------- Co-authored-by: John Wellbelove commit 325908b1b9b04d5e67655932bd07f390ebe982b0 Author: William Sciaroni Date: Mon Mar 23 14:30:03 2026 -0500 Add permutation functions (#1348) * Print test names at test time (#1343) * Add permutation functions * Refactor permutation to use etl::less * Add test for next_permutation where begin == end * Update code to avoid multiple bind1st objects in loop * Remove duplicate is_partitioned test case Removed the duplicate is_partitioned test case from the test suite. --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove commit 29ad4b327e8a3981dac9b6787fb7273651c841ff Author: Henri Bragge Date: Tue Mar 17 12:05:28 2026 +0100 Fix comment in queue::pop (#1347) * Print test names at test time (#1343) * Fix comment in queue::pop --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove commit 3639850b6bcb8fc3161f64d22612d6ab25f710fa Author: John Wellbelove Date: Fri Mar 13 07:37:02 2026 +0000 Fixed type_traits.h generator commit 89284de73377992171bb65d975f254c59422a1cd Author: Roland Reichwein Date: Fri Mar 13 01:11:51 2026 +0100 Add treefmt support (#1323) Co-authored-by: John Wellbelove commit ad6e027b08b4d900f5cac616db0ab77cc17ef4c7 Author: Ralph Rooding Date: Thu Mar 12 21:39:53 2026 +0100 Add PURL to Zephyr module.yml for SBoM generation (#1344) Co-authored-by: John Wellbelove commit 78d8b82afb61bca0ee4599403700641b321dd493 Author: Roland Reichwein Date: Thu Mar 12 20:55:16 2026 +0100 Print test names at test time (#1343) commit a0c98662ca62682e915549002dd6681b54addb6a Author: Roland Reichwein Date: Thu Mar 12 20:55:16 2026 +0100 Print test names at test time (#1343) commit 237d83c107d92f8d20f611b326cce1ba4a8b019f Author: Christoph Rüthing Date: Thu Mar 12 20:47:39 2026 +0100 Add pre C++20 Support for ETL_CONSTINIT using Compiler Extensions (#1335) Co-authored-by: John Wellbelove commit 8a61985ac847aa530fa49d9c9b5e79211dbe78c1 Author: John Wellbelove Date: Thu Mar 12 17:08:02 2026 +0000 span is constructible from temporary (#1338) * Added missing files from VS2022 project * Added global data() overloads to complement etl::size() * Added C++03 compatible implementation of etl::is_convertible * Updated etl::span to more closely align with std::span * Fix etl::rotate (#1327) Per the C++ standard, std::rotate returns first + (last - middle): * When first == middle, return last * When middle == last, return first * Fix greater_equal and less_equal (#1331) * Align comparison operators (#1330) In functional.h, the comparison operators for equal_to and not_equal_to mismatch between the actual comparison execution and the type inference for the return type. This change adjusts it by using the same operator==() in the return type inference as used in the comparison execution. Co-authored-by: John Wellbelove * Add missing tests (#1321) * Add missing tests * Typo fixes --------- Co-authored-by: John Wellbelove * Add ETL_FORMAT_NO_FLOATING_POINT control macro for etl::format (#1329) When ETL_FORMAT_NO_FLOATING_POINT is defined, all floating-point formatting support (float, double, long double) is excluded from etl::format. This reduces code size on targets that do not require floating-point formatting. Guarded sections: - #include - float/double/long double in supported_format_types variant - float/double/long double constructors in basic_format_arg - format_floating_* functions and format_aligned_floating - formatter, formatter, formatter - Floating-point test cases in test_format.cpp Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus Co-authored-by: John Wellbelove # Conflicts: # include/etl/platform.h * Manchester documentation (#1325) * manchester * Added manchester code and test * manchester * Formatting and added missing file * manchester * Some functions can only be constexpr since C++14 * manchester * Manchester decode and some refactoring * manchester * Added some missing typenames * manchester * constexpr void function not allowed in C++11 * manchester * condition on static_assert tests * manchester * revert CMakeLists.txt * Using ETL_STATIC_ASSERT * Some cleanup * manchester * Added static_assert message * manchester * Added compile time tests * manchester * Added invert manchester * Some refactoring * manchester * Disable test for now * Move ETL_NODISCARD before static * manchester * Test for valid_span * manchester * Remove redundant (?) storage specifiers for template specializations. Storage specifier already given in base template * manchester * refactoring to get rid of specialized template functions in template class * manchester * cleanup * manchester * Added documentation comments * Some refactoring * manchester * introducing namespace detail_manchester * manchester * Some refactoring * Update tests * manchester * Some refactoring * Removed possible undefined behavior by refactoring encode_span * constexpr version of encode_span * Static assertion for rare case where code doesn't work because CHAR_BIT is not the same as the number of bits in uint_least8_t * manchester * renamed valid to is_valid * manchester * renamed is_valid_span to is_valid * Using etl exceptions in ETL_ASSERT * manchester * Removed _fast functions * merged encode_in_place with encode and decode_in_place with decode * removed _span to create normal overloads of encode and decode for span * Some renaming and minor refactoring * manchester * Fix build issues * manchester * Conditionally compile manchester_decoded * Update test_manchester.cpp Removed redundant semicolon * #1258 Manchester coding * Formatting * consistency: hex literals with lower case 0x * #1258 Manchester coding * Moved copyright to top of file * Make constexpr encode/decode span functions equal for little and big endian platforms * #1258 Manchester coding * Added missing include * Added missing 8bit/64bit guards * Fixed is_valid for big endian platforms * #1258 Manchester coding * private memcpy alias * #1258 Manchester coding * Review comments * #1258 Manchester coding * Cleanup * Fix build error * #1258 Manchester coding * Add manchester documentation * #1258 Manchester coding * Preparation for GitHub pages * #1324 Manchester documentation * Some small fixes --------- Co-authored-by: Timon Zijnge * Moved and split has_size_and_data in span.h to has_size & has_data in type_traits.h * Removed has_size_and_data traits, and move to type_traits.h Added ETL_ASSERT for for fixed extent constructors from iterator range and begin/size * Added macro ETL_NOEXCEPT_IF that takes a compile time boolean expression * Changed two fixed span constructors to ETL_CONSTEXPR14 due to ETL_ASSERT in the constructor bodies Added ETL_NOEXCEPT_IF for simpler boolean conditions Added tests for construction from mismatched sizes * Added definition for ETL_NOEXCEPT_IF in no C++11 path * Changes to disable construction from rvalue temporaries --------- Co-authored-by: John Wellbelove Co-authored-by: Roland Reichwein Co-authored-by: Niu Zhihong Co-authored-by: Sisyphus Co-authored-by: Timon Zijnge <47081647+tzijnge@users.noreply.github.com> Co-authored-by: Timon Zijnge commit d3affac417827a9d2bef270c3430dcf334cd9d00 Author: John Wellbelove Date: Thu Mar 12 17:06:26 2026 +0000 Enforce o(log n) dispatch for messages when using fsm for c++11 and up (#1337) * Updated message handling to be worst case O(logN) * Copied optimised message handling from etl::fsm * Updated fsm generator * Updated message_router generator * Added optimised accepts() member function * Modified comment, as the FSM doesn't support a successor * Updated version and release notes * Hotfix/etl multiset iterator invalidation during erase leads to incorrect sorted order in depth first traversal (#1317) * Fixed issue for both multiset and multimap * Added std::is_sorted checks to all map/set tests * Updated with coderabbit suggestions --------- Co-authored-by: John Wellbelove * Updated release notes and version * Changed std::is_same to etl::is_same in struct type_list_is_unique (#1320) Co-authored-by: John Wellbelove * Updated release notes and version * Fix etl::rotate (#1327) Per the C++ standard, std::rotate returns first + (last - middle): * When first == middle, return last * When middle == last, return first * Added missing files from VS2022 project * Fix greater_equal and less_equal (#1331) * Align comparison operators (#1330) In functional.h, the comparison operators for equal_to and not_equal_to mismatch between the actual comparison execution and the type inference for the return type. This change adjusts it by using the same operator==() in the return type inference as used in the comparison execution. Co-authored-by: John Wellbelove * Add missing tests (#1321) * Add missing tests * Typo fixes --------- Co-authored-by: John Wellbelove * Add ETL_FORMAT_NO_FLOATING_POINT control macro for etl::format (#1329) When ETL_FORMAT_NO_FLOATING_POINT is defined, all floating-point formatting support (float, double, long double) is excluded from etl::format. This reduces code size on targets that do not require floating-point formatting. Guarded sections: - #include - float/double/long double in supported_format_types variant - float/double/long double constructors in basic_format_arg - format_floating_* functions and format_aligned_floating - formatter, formatter, formatter - Floating-point test cases in test_format.cpp Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus Co-authored-by: John Wellbelove * Manchester documentation (#1325) * manchester * Added manchester code and test * manchester * Formatting and added missing file * manchester * Some functions can only be constexpr since C++14 * manchester * Manchester decode and some refactoring * manchester * Added some missing typenames * manchester * constexpr void function not allowed in C++11 * manchester * condition on static_assert tests * manchester * revert CMakeLists.txt * Using ETL_STATIC_ASSERT * Some cleanup * manchester * Added static_assert message * manchester * Added compile time tests * manchester * Added invert manchester * Some refactoring * manchester * Disable test for now * Move ETL_NODISCARD before static * manchester * Test for valid_span * manchester * Remove redundant (?) storage specifiers for template specializations. Storage specifier already given in base template * manchester * refactoring to get rid of specialized template functions in template class * manchester * cleanup * manchester * Added documentation comments * Some refactoring * manchester * introducing namespace detail_manchester * manchester * Some refactoring * Update tests * manchester * Some refactoring * Removed possible undefined behavior by refactoring encode_span * constexpr version of encode_span * Static assertion for rare case where code doesn't work because CHAR_BIT is not the same as the number of bits in uint_least8_t * manchester * renamed valid to is_valid * manchester * renamed is_valid_span to is_valid * Using etl exceptions in ETL_ASSERT * manchester * Removed _fast functions * merged encode_in_place with encode and decode_in_place with decode * removed _span to create normal overloads of encode and decode for span * Some renaming and minor refactoring * manchester * Fix build issues * manchester * Conditionally compile manchester_decoded * Update test_manchester.cpp Removed redundant semicolon * #1258 Manchester coding * Formatting * consistency: hex literals with lower case 0x * #1258 Manchester coding * Moved copyright to top of file * Make constexpr encode/decode span functions equal for little and big endian platforms * #1258 Manchester coding * Added missing include * Added missing 8bit/64bit guards * Fixed is_valid for big endian platforms * #1258 Manchester coding * private memcpy alias * #1258 Manchester coding * Review comments * #1258 Manchester coding * Cleanup * Fix build error * #1258 Manchester coding * Add manchester documentation * #1258 Manchester coding * Preparation for GitHub pages * #1324 Manchester documentation * Some small fixes --------- Co-authored-by: Timon Zijnge * Changes from review of algorithm.h on development branch (#1340) * Add missing constexpr in algorithm.h * Fix call of nth_element 2nd argument (nth) was missing * Replace partition point with O(log(N)) algorithm The C++ standard defines O(log(N)) calls of predicate as the complexity of partition_point(). The old algorithm was linear. * Use predicate in calculation of is_permutation consistently In case of predicate not equal_to, the calculation previously returned wron results * Omit swap in selection_sort if iterators are equal * Use difference_type in rotate_general() instead of int * Typo fix in algorithm.h * Simplifications in algorithm.h Application of plain refactoring by keeping semantics * Guard against past-end iterator in etl::rotate() And fix scope of rotate_right_by_one for etl::rotate() * Support empty ranges in selection_sort * Add tests for swap_ranges * Add tests for binary_search * Add tests for find_end * Add tests for accumulate * Add tests for move_s * Added tests for is_heap and sort_heap * Remove early exit for empty input * Add adjacent_find * Add unique * Add unique_copy * Add merge * Add inplace_merge * Add partial_sort * Add partial_sort_copy * copilot review change --------- Co-authored-by: John Wellbelove Co-authored-by: Roland Reichwein Co-authored-by: Niu Zhihong Co-authored-by: Sisyphus Co-authored-by: Timon Zijnge <47081647+tzijnge@users.noreply.github.com> Co-authored-by: Timon Zijnge commit 0a56d40bdd3d86f3f7fc59df6579c5a137411ca9 Author: Roland Reichwein Date: Thu Mar 12 17:38:10 2026 +0100 Fix undefined behaviour of etl::absolute() for etl::numeric_limits::min (#1333) absolute_unsigned() already handled that case correctly. Now adding this check to absolute() also. It can be caught at compile time now, if in a constexpr context. Also separating integral and non-integral versions via enable_if. Co-authored-by: John Wellbelove commit 54a1c82c98969d130634da5c990e4756ec4b3ddb Author: Roland Reichwein Date: Thu Mar 12 16:54:51 2026 +0100 Fix run-syntax-checks.sh to be executable (#1342) Co-authored-by: John Wellbelove commit 4a8c167a31ad612693f0ef79f4ee925bc527bca5 Author: Roland Reichwein Date: Tue Mar 10 21:39:13 2026 +0100 Changes from review of algorithm.h on development branch (#1340) * Add missing constexpr in algorithm.h * Fix call of nth_element 2nd argument (nth) was missing * Replace partition point with O(log(N)) algorithm The C++ standard defines O(log(N)) calls of predicate as the complexity of partition_point(). The old algorithm was linear. * Use predicate in calculation of is_permutation consistently In case of predicate not equal_to, the calculation previously returned wron results * Omit swap in selection_sort if iterators are equal * Use difference_type in rotate_general() instead of int * Typo fix in algorithm.h * Simplifications in algorithm.h Application of plain refactoring by keeping semantics * Guard against past-end iterator in etl::rotate() And fix scope of rotate_right_by_one for etl::rotate() * Support empty ranges in selection_sort * Add tests for swap_ranges * Add tests for binary_search * Add tests for find_end * Add tests for accumulate * Add tests for move_s * Added tests for is_heap and sort_heap * Remove early exit for empty input * Add adjacent_find * Add unique * Add unique_copy * Add merge * Add inplace_merge * Add partial_sort * Add partial_sort_copy commit 521df8ee19bf0b84b82086c2441c1c2f0c463380 Author: Timon Zijnge <47081647+tzijnge@users.noreply.github.com> Date: Sat Mar 7 09:13:00 2026 +0100 Manchester documentation (#1325) * manchester * Added manchester code and test * manchester * Formatting and added missing file * manchester * Some functions can only be constexpr since C++14 * manchester * Manchester decode and some refactoring * manchester * Added some missing typenames * manchester * constexpr void function not allowed in C++11 * manchester * condition on static_assert tests * manchester * revert CMakeLists.txt * Using ETL_STATIC_ASSERT * Some cleanup * manchester * Added static_assert message * manchester * Added compile time tests * manchester * Added invert manchester * Some refactoring * manchester * Disable test for now * Move ETL_NODISCARD before static * manchester * Test for valid_span * manchester * Remove redundant (?) storage specifiers for template specializations. Storage specifier already given in base template * manchester * refactoring to get rid of specialized template functions in template class * manchester * cleanup * manchester * Added documentation comments * Some refactoring * manchester * introducing namespace detail_manchester * manchester * Some refactoring * Update tests * manchester * Some refactoring * Removed possible undefined behavior by refactoring encode_span * constexpr version of encode_span * Static assertion for rare case where code doesn't work because CHAR_BIT is not the same as the number of bits in uint_least8_t * manchester * renamed valid to is_valid * manchester * renamed is_valid_span to is_valid * Using etl exceptions in ETL_ASSERT * manchester * Removed _fast functions * merged encode_in_place with encode and decode_in_place with decode * removed _span to create normal overloads of encode and decode for span * Some renaming and minor refactoring * manchester * Fix build issues * manchester * Conditionally compile manchester_decoded * Update test_manchester.cpp Removed redundant semicolon * #1258 Manchester coding * Formatting * consistency: hex literals with lower case 0x * #1258 Manchester coding * Moved copyright to top of file * Make constexpr encode/decode span functions equal for little and big endian platforms * #1258 Manchester coding * Added missing include * Added missing 8bit/64bit guards * Fixed is_valid for big endian platforms * #1258 Manchester coding * private memcpy alias * #1258 Manchester coding * Review comments * #1258 Manchester coding * Cleanup * Fix build error * #1258 Manchester coding * Add manchester documentation * #1258 Manchester coding * Preparation for GitHub pages * #1324 Manchester documentation * Some small fixes --------- Co-authored-by: Timon Zijnge commit 8ce59792fd4667c33f61e749f3397a565514fc4d Author: Niu Zhihong Date: Sat Mar 7 06:04:32 2026 +0800 Add ETL_FORMAT_NO_FLOATING_POINT control macro for etl::format (#1329) When ETL_FORMAT_NO_FLOATING_POINT is defined, all floating-point formatting support (float, double, long double) is excluded from etl::format. This reduces code size on targets that do not require floating-point formatting. Guarded sections: - #include - float/double/long double in supported_format_types variant - float/double/long double constructors in basic_format_arg - format_floating_* functions and format_aligned_floating - formatter, formatter, formatter - Floating-point test cases in test_format.cpp Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus Co-authored-by: John Wellbelove commit 67ecc8e11e2be245c15f03b231108b1adbd5882e Author: Roland Reichwein Date: Fri Mar 6 22:34:54 2026 +0100 Add missing tests (#1321) * Add missing tests * Typo fixes --------- Co-authored-by: John Wellbelove commit 7329efc7dfde1116de974899558be5345ec0e5c2 Author: Roland Reichwein Date: Fri Mar 6 21:29:58 2026 +0100 Align comparison operators (#1330) In functional.h, the comparison operators for equal_to and not_equal_to mismatch between the actual comparison execution and the type inference for the return type. This change adjusts it by using the same operator==() in the return type inference as used in the comparison execution. Co-authored-by: John Wellbelove commit 4ad6126ec5fdd7c27ed359ee09de2482e922bebb Author: Roland Reichwein Date: Fri Mar 6 21:08:31 2026 +0100 Fix greater_equal and less_equal (#1331) commit f96510bd79dca27c7a9445b56d3625d85e219843 Author: John Wellbelove Date: Mon Mar 2 09:59:08 2026 +0000 Added missing files from VS2022 project commit a8ebe338f80ee25fcc79d53cdbc8140bf208fae1 Author: Roland Reichwein Date: Fri Mar 6 11:11:46 2026 +0100 Fix etl::rotate (#1327) Per the C++ standard, std::rotate returns first + (last - middle): * When first == middle, return last * When middle == last, return first commit 7bac1d02f7b4fe31592842ae824d6c1c6b0b16af Author: John Wellbelove Date: Mon Mar 2 09:16:18 2026 +0000 Updated release notes and version commit 25c9235cbc1901b4911f5a15e2cdf9f578dc9231 Author: John Wellbelove Date: Mon Mar 2 09:13:19 2026 +0000 Changed std::is_same to etl::is_same in struct type_list_is_unique (#1320) Co-authored-by: John Wellbelove commit 6ed9ca3f1ddbc4b046ec40061c7e1016a653135c Author: John Wellbelove Date: Sun Mar 1 13:12:39 2026 +0000 Updated release notes and version commit 7ee7f10f58d7742500197033c4ff748acccc4f06 Author: John Wellbelove Date: Sun Mar 1 12:27:39 2026 +0000 Hotfix/etl multiset iterator invalidation during erase leads to incorrect sorted order in depth first traversal (#1317) * Fixed issue for both multiset and multimap * Added std::is_sorted checks to all map/set tests * Updated with coderabbit suggestions --------- Co-authored-by: John Wellbelove commit 70e4850a0b17e1d50f60a87cf1545e4d419c0036 Author: John Wellbelove Date: Fri Feb 27 17:43:47 2026 +0000 Updated version and release notes commit 089f65cce168c57af46907178f925ced7fb3ba0c Author: John Wellbelove Date: Fri Feb 27 11:18:29 2026 +0000 Added get_endianness() to etl::byte_stream_reader (#1315) Co-authored-by: John Wellbelove commit 810a106bdfb40f49087ceb39dc541f3d9d9bd0c3 Author: Timon Zijnge <47081647+tzijnge@users.noreply.github.com> Date: Fri Feb 27 10:40:42 2026 +0100 #1258 Manchester coding (#1285) * manchester * Added manchester code and test * manchester * Formatting and added missing file * manchester * Some functions can only be constexpr since C++14 * manchester * Manchester decode and some refactoring * manchester * Added some missing typenames * manchester * constexpr void function not allowed in C++11 * manchester * condition on static_assert tests * manchester * revert CMakeLists.txt * Using ETL_STATIC_ASSERT * Some cleanup * manchester * Added static_assert message * manchester * Added compile time tests * manchester * Added invert manchester * Some refactoring * manchester * Disable test for now * Move ETL_NODISCARD before static * manchester * Test for valid_span * manchester * Remove redundant (?) storage specifiers for template specializations. Storage specifier already given in base template * manchester * refactoring to get rid of specialized template functions in template class * manchester * cleanup * manchester * Added documentation comments * Some refactoring * manchester * introducing namespace detail_manchester * manchester * Some refactoring * Update tests * manchester * Some refactoring * Removed possible undefined behavior by refactoring encode_span * constexpr version of encode_span * Static assertion for rare case where code doesn't work because CHAR_BIT is not the same as the number of bits in uint_least8_t * manchester * renamed valid to is_valid * manchester * renamed is_valid_span to is_valid * Using etl exceptions in ETL_ASSERT * manchester * Removed _fast functions * merged encode_in_place with encode and decode_in_place with decode * removed _span to create normal overloads of encode and decode for span * Some renaming and minor refactoring * manchester * Fix build issues * manchester * Conditionally compile manchester_decoded * Update test_manchester.cpp Removed redundant semicolon * #1258 Manchester coding * Formatting * consistency: hex literals with lower case 0x * #1258 Manchester coding * Moved copyright to top of file * Make constexpr encode/decode span functions equal for little and big endian platforms * #1258 Manchester coding * Added missing include * Added missing 8bit/64bit guards * Fixed is_valid for big endian platforms * #1258 Manchester coding * private memcpy alias * #1258 Manchester coding * Review comments * #1258 Manchester coding * Cleanup * Fix build error --------- Co-authored-by: Timon Zijnge commit 7ef01fcaed64bcc8fe9a6e70c4914dd8581ce282 Author: John Wellbelove Date: Thu Feb 26 10:34:14 2026 +0000 Enforce worse-case O(log n) dispatch for messages when using message router for c++11 and up (#1312) * Added compare_message_id * Added new C++11 and up message routing code using a sorted type_list * Renamed compare_message)id to compare_message_id_less * Added documenation for compare_message_id_less Added static asserts for message type template parameters * Added optimisation for contiguous message IDs Added more Doxygen documentation * Added etl::type_list_all_of, etl::type_list_any_of, and etl::type_list_none_of * Added etl::type_list_is_unique * Added common definitions to all router types * Added static_asserts to check message types * Added etl::type_list to etl::nth_type * Added missing 'typename' to type_list nth_type * Added type_list_is_empty * indentation fix * Renamed type_list_prepend & type_list_append to type_list_push_front & type_list_push_back respectively * Added tests for make_index_sequence & make_index_sequence_with_offset * Add more features to etl::type_list (#1307) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Added etl::type_list to etl::observer * Added etl::type_list to etl::nth_type * Added missing 'typename' to type_list nth_type * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added type_list definitions for nth_type and observer * Added etl::type_list to etl::variant * Updated comments * Addedetl::type~_list to message_router, observer, visitor # Conflicts: # include/etl/observer.h # test/vs2022/etl.vcxproj.filters * Added member type_list type to tuple * Work in progress * Copy changes from other source * Removed unused tests * Fix iter_swap namespace * Add type_list functionality to etl::variant using etl::variant_from_type_list * Add type_list functionality to etl::message_packet using etl::message_packet_from_type_list * Add type_list functionality to etl::message_router using etl::message_router_from_type_list * Add type_list functionality to etl::observer using etl::observer_from_type_list * Add type_list functionality to etl::tuple using etl::tuple_from_type_list * Allow etl::make_index_sequence to be created from an etl::type_list * Add type_list functionality to etl::visitor using etl::visitor_from_type_list * Fix iter_swap namespace * Allow creation of a message_packet with no message types * Allow creation of a message_router with no message types * Updated VS2022 project files * Added missing test files CMakeLists.txt * Fix C++03 compatibility Fixed unused aregument warnings * Synced message_packet generator to updated code * Synced message_router generator to updated code * Synced message_router generator to updated code # Conflicts: # include/etl/generators/message_router_generator.h # include/etl/message_router.h * Fixed missing zero message specialisation for <= C++14 * Fixed missing zero message specialisation for <= C++14 * Fix year_month arithmetic and correct chrono API behavior (#1257) * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Restore default constructor behavior for chrono calender * Suppress warnings from std in optimized builds (#1259) When testing with ./run-tests.sh 23 3 10, some warnings from std surfaced which resulted in build errors. * Add template deduction guide for span from vector (#1264) * Create span from vector deduction * Use ivector for deduction. Add vector_ext to test * Add vector pointer to test * Finish tests * Initialize pdata_ext and others * Document how to implement platform specifics (#1262) Some interfaces need to be implemented in every project or platform using the ETL: * etl_get_high_resolution_clock * etl_get_system_clock * etl_get_steady_clock * etl_putchar Co-authored-by: John Wellbelove * Fix etl::as_bytes for etl::span (#1266) A missing 'const' in the etl::as_bytes implementation was causing a compile-time error when etl::as_bytes was called on a span of const values. Co-authored-by: John Wellbelove * Remove some UB in test_vector_non_trivial.cpp (#1268) Some of the tests' UB are detectable by Gcc15 and thus give a compile error due to warnings-as-error flag. Co-authored-by: John Wellbelove * Update C++26 deprecated constructs to ensure future standard compliance (#1267) * Update C++26 deprecated constructs to ensure future standard compliance I replaced std::is_trivial with a combination of std::is_trivially_default_constructible and std::is_trivially_copyable. Additionally, I added the required comma before the ellipsis in variadic functions to match updated language specifications. * Some additional is_trivial related changes not found directly when compiling tests in C++26 --------- Co-authored-by: John Wellbelove * Fix return value of get_token_list (#1271) Co-authored-by: John Wellbelove * Fix etl::tuple template signature error in pair assignment operator (#1265) * Fix etl::tuple template signature error in pair assignment operator * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update etl::tuple to explicitly use etl::pair or std::pair in assignment operator * Added tests for etl::tuple assignment from pair --------- Co-authored-by: Bryton Flecker Co-authored-by: John Wellbelove * Remove advance() on static spans (#1281) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Remove advance() on static spans Since the size of a static span is constant, we can't reasonably advance() on it. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add missing includes (#1286) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add missing includes Before this change, the includes needed to be done explicitly by files using basic_string_stream.h, and be included first. This was error prone, especially if includes are reordered (e.g. via the currently defined clang-format rules). --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Move comparison operators of etl::expected to namespace etl (#1287) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Move comparison operators of etl::expected to namespace etl --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Make typed_storage constructor constexpr (#1291) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Make typed_storage constructor constexpr --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add basic_format_arg constructor for ibasic_string (#1288) * Allow string as format arg * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added test string escaped * Add temporary string test --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * QR Code for Github * Added etl::visitor_from_type_list * accepts(id) for empty router passes on to a sucessor * Fixed incorrect comment from 'tuple' to 'message_router' * PR review changes * PR review changes * Fixed internal constexptr flag in message_packet * Fixed unused variable in unti test * Added new type_list features Added make_index_sequence_with_offset * Renamed type_list_select_from_sequence to type_list_select_from_index_sequence * Replaced type_list_size::value with TTypeList::size internally for better clarity. * Added etl::type_list_remove, etl::type_list_remove_if, etl::type_list_unique, etl::type_list_pop_front, etl::type_list_pop_back * Add ref-qualifiers to basic_format_spec (#1292) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * feat: use ref-qualifiers for basic_format_spec Converted the l-value methods to ref-qualified and also added r-value ref-qualified methods. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add support for size_t and unsigned long to etl::format (#1290) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add support for size_t and unsigned long to etl::format * Document list of supported types in etl::supported_format_types * Add further types and tests for etl::format --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Deduce underlying storage size when constructing string_ext from char[]. (#1269) * Deduce underlying storage size when constructing string_ext from char[]. This removes the need for passing sizeof(storage) to the constructor. * Add array constructors for the other string types. - u16string_ext - u32string_ext - u8string_ext - wstring_ext * Add additional constructors to match existing API. * Fix inconsistent test argument order. --------- Co-authored-by: John Wellbelove * Added etl::type_list_all_of, etl::type_list_any_of, and etl::type_list_none_of * Added etl::type_list_is_unique * Added type_list_is_empty * indentation fix * Fix merge error * Renamed type_list_prepend & type_list_append to type_list_push_front & type_list_push_back respectively * Added tests for make_index_sequence & make_index_sequence_with_offset * Resolve coderabbit review issues * Resolve coderabbit review issues * Resolve coderabbit review issues * Resolve coderabbit review issues * Added etl::type_list_indices_of_type which create an etl::index_sequence of all of the indexes of a specified type in an etl::type_list * Updated comments * Resolve coderabbit review issues Added index_sequence utility to support type_list utilities. Added additional index_sequence utilities for completeness * Added etl::index_sequence_cat, etl::index_sequence_pop_front, etl::index_sequence_pop_back, etl::index_sequence_at * Fix 'unused variable' error in index_sequence tests --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei Co-authored-by: John Wellbelove Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com> Co-authored-by: Roland Reichwein Co-authored-by: Mike Bloom <91038685+mike919192@users.noreply.github.com> Co-authored-by: taltenbach <92919739+taltenbach@users.noreply.github.com> Co-authored-by: Bryton Flecker Co-authored-by: Bryton Flecker Co-authored-by: Drew Rife Co-authored-by: Marco Nilsson * Moved O(1)/O(logN) index search test to get_dispatch_index_from_message_id Updated message_router generator * Fixed C++03 compatibilty * Replaced is_base_of with is_message * Missing 'return' in chrono example * Fixed doxygen comments * Check message inherits from etl::message<> * Copilot & coderabbit review changes Check for no duplicated message IDs Added diagnostic disable Make Message_Id_Start an etl::message_id_t type * Synchronised message_router_generator.h * Modified the "All message IDs must be unique" static_assert to directly use the index_sequence of message IDs Added addition index_sequence utilities to support this change. * Changed Router1 definition to use unordered message ids to check message sorting in message_router * Added has_message_id and compare_message_id_less to message.h * Moved member type definitions to a traits class message_packet, message_types, sorted_message_types * Sync message_router_generator to changes * Fixed C++03 compatibility --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove Co-authored-by: Sergei Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com> Co-authored-by: Roland Reichwein Co-authored-by: Mike Bloom <91038685+mike919192@users.noreply.github.com> Co-authored-by: taltenbach <92919739+taltenbach@users.noreply.github.com> Co-authored-by: Bryton Flecker Co-authored-by: Bryton Flecker Co-authored-by: Drew Rife Co-authored-by: Marco Nilsson commit e439963258f56d8956417a44a5d677eaf1ec0c20 Author: Roland Reichwein Date: Wed Feb 25 10:42:56 2026 +0100 Fix etl::variant get() for ambiguous types (#1304) When a type occured multiple times in a variant, comparison operator asserted before. Co-authored-by: John Wellbelove commit 37aba589655667d1a84957e289c7fba87b231816 Author: Marco Nilsson Date: Wed Feb 25 10:02:02 2026 +0100 Reduce string flash usage (#1309) * Remove call to initialise() in constructors. The constructor execution flows were: constructor initialise() assign() append_impl() initialise() does: - Set current_size to 0 - Null terminate the buffer - Clear truncation flag append_impl() does: - Assign truncation flag - Set current size to source size - Copy and null terminate the buffer All the hard work done by initialise() is immediately overwritten. Removing the call to initialise() saves 6-8 bytes of flash per constructor invocation when targeting Cortex M33 with -Os. * Avoid calling templated assign(iter, iter) with C strings. Call the single pointer version of assign which ends up in the non-templated append_impl. This calls the C lib's strlen and memmove rather than etl::strlen which is a hand rolled loop. This also reduces the risk of instantiating the iterator version of assign() if it's not used elsewhere. * Dispatch pointer iterators to non-template append_impl core. When append_impl is called with pointer iterators (e.g. begin()/end()), SFINAE routes them to a non-template core that takes a pointer and length. This avoids duplicating the function body for each pointer type instantiation, reducing flash usage on ARM Cortex-M by ~836 bytes at -Os. * Revert make_string changes. The original implementation used a bounded strlen which avoided OOB array access. * Treat start, free_space and count as size_t to avoid casts. * Ensure that append start is within the buffer. --------- Co-authored-by: John Wellbelove commit 7a8944224b5d884a1df2545d6cb597673d9a5e1c Author: John Wellbelove Date: Sat Feb 21 09:36:48 2026 +0000 Add more features to etl::type_list (#1307) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Added etl::type_list to etl::observer * Added etl::type_list to etl::nth_type * Added missing 'typename' to type_list nth_type * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added type_list definitions for nth_type and observer * Added etl::type_list to etl::variant * Updated comments * Addedetl::type~_list to message_router, observer, visitor # Conflicts: # include/etl/observer.h # test/vs2022/etl.vcxproj.filters * Added member type_list type to tuple * Work in progress * Copy changes from other source * Removed unused tests * Fix iter_swap namespace * Add type_list functionality to etl::variant using etl::variant_from_type_list * Add type_list functionality to etl::message_packet using etl::message_packet_from_type_list * Add type_list functionality to etl::message_router using etl::message_router_from_type_list * Add type_list functionality to etl::observer using etl::observer_from_type_list * Add type_list functionality to etl::tuple using etl::tuple_from_type_list * Allow etl::make_index_sequence to be created from an etl::type_list * Add type_list functionality to etl::visitor using etl::visitor_from_type_list * Fix iter_swap namespace * Allow creation of a message_packet with no message types * Allow creation of a message_router with no message types * Updated VS2022 project files * Added missing test files CMakeLists.txt * Fix C++03 compatibility Fixed unused aregument warnings * Synced message_packet generator to updated code * Synced message_router generator to updated code * Synced message_router generator to updated code # Conflicts: # include/etl/generators/message_router_generator.h # include/etl/message_router.h * Fixed missing zero message specialisation for <= C++14 * Fixed missing zero message specialisation for <= C++14 * Fix year_month arithmetic and correct chrono API behavior (#1257) * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Restore default constructor behavior for chrono calender * Suppress warnings from std in optimized builds (#1259) When testing with ./run-tests.sh 23 3 10, some warnings from std surfaced which resulted in build errors. * Add template deduction guide for span from vector (#1264) * Create span from vector deduction * Use ivector for deduction. Add vector_ext to test * Add vector pointer to test * Finish tests * Initialize pdata_ext and others * Document how to implement platform specifics (#1262) Some interfaces need to be implemented in every project or platform using the ETL: * etl_get_high_resolution_clock * etl_get_system_clock * etl_get_steady_clock * etl_putchar Co-authored-by: John Wellbelove * Fix etl::as_bytes for etl::span (#1266) A missing 'const' in the etl::as_bytes implementation was causing a compile-time error when etl::as_bytes was called on a span of const values. Co-authored-by: John Wellbelove * Remove some UB in test_vector_non_trivial.cpp (#1268) Some of the tests' UB are detectable by Gcc15 and thus give a compile error due to warnings-as-error flag. Co-authored-by: John Wellbelove * Update C++26 deprecated constructs to ensure future standard compliance (#1267) * Update C++26 deprecated constructs to ensure future standard compliance I replaced std::is_trivial with a combination of std::is_trivially_default_constructible and std::is_trivially_copyable. Additionally, I added the required comma before the ellipsis in variadic functions to match updated language specifications. * Some additional is_trivial related changes not found directly when compiling tests in C++26 --------- Co-authored-by: John Wellbelove * Fix return value of get_token_list (#1271) Co-authored-by: John Wellbelove * Fix etl::tuple template signature error in pair assignment operator (#1265) * Fix etl::tuple template signature error in pair assignment operator * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update etl::tuple to explicitly use etl::pair or std::pair in assignment operator * Added tests for etl::tuple assignment from pair --------- Co-authored-by: Bryton Flecker Co-authored-by: John Wellbelove * Remove advance() on static spans (#1281) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Remove advance() on static spans Since the size of a static span is constant, we can't reasonably advance() on it. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add missing includes (#1286) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add missing includes Before this change, the includes needed to be done explicitly by files using basic_string_stream.h, and be included first. This was error prone, especially if includes are reordered (e.g. via the currently defined clang-format rules). --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Move comparison operators of etl::expected to namespace etl (#1287) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Move comparison operators of etl::expected to namespace etl --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Make typed_storage constructor constexpr (#1291) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Make typed_storage constructor constexpr --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add basic_format_arg constructor for ibasic_string (#1288) * Allow string as format arg * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added test string escaped * Add temporary string test --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * QR Code for Github * Added etl::visitor_from_type_list * accepts(id) for empty router passes on to a sucessor * Fixed incorrect comment from 'tuple' to 'message_router' * PR review changes * PR review changes * Fixed internal constexptr flag in message_packet * Fixed unused variable in unti test * Added new type_list features Added make_index_sequence_with_offset * Renamed type_list_select_from_sequence to type_list_select_from_index_sequence * Replaced type_list_size::value with TTypeList::size internally for better clarity. * Added etl::type_list_remove, etl::type_list_remove_if, etl::type_list_unique, etl::type_list_pop_front, etl::type_list_pop_back * Add ref-qualifiers to basic_format_spec (#1292) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * feat: use ref-qualifiers for basic_format_spec Converted the l-value methods to ref-qualified and also added r-value ref-qualified methods. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add support for size_t and unsigned long to etl::format (#1290) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add support for size_t and unsigned long to etl::format * Document list of supported types in etl::supported_format_types * Add further types and tests for etl::format --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Deduce underlying storage size when constructing string_ext from char[]. (#1269) * Deduce underlying storage size when constructing string_ext from char[]. This removes the need for passing sizeof(storage) to the constructor. * Add array constructors for the other string types. - u16string_ext - u32string_ext - u8string_ext - wstring_ext * Add additional constructors to match existing API. * Fix inconsistent test argument order. --------- Co-authored-by: John Wellbelove * Added etl::type_list_all_of, etl::type_list_any_of, and etl::type_list_none_of * Added etl::type_list_is_unique * Added type_list_is_empty * indentation fix * Fix merge error * Renamed type_list_prepend & type_list_append to type_list_push_front & type_list_push_back respectively * Added tests for make_index_sequence & make_index_sequence_with_offset * Resolve coderabbit review issues * Resolve coderabbit review issues * Resolve coderabbit review issues * Resolve coderabbit review issues * Added etl::type_list_indices_of_type which create an etl::index_sequence of all of the indexes of a specified type in an etl::type_list * Updated comments * Resolve coderabbit review issues Added index_sequence utility to support type_list utilities. Added additional index_sequence utilities for completeness * Added etl::index_sequence_cat, etl::index_sequence_pop_front, etl::index_sequence_pop_back, etl::index_sequence_at * Fix 'unused variable' error in index_sequence tests --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei Co-authored-by: John Wellbelove Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com> Co-authored-by: Roland Reichwein Co-authored-by: Mike Bloom <91038685+mike919192@users.noreply.github.com> Co-authored-by: taltenbach <92919739+taltenbach@users.noreply.github.com> Co-authored-by: Bryton Flecker Co-authored-by: Bryton Flecker Co-authored-by: Drew Rife Co-authored-by: Marco Nilsson commit 58b5bf51902df940587df976ded671e25f5d582e Author: John Wellbelove Date: Thu Feb 19 19:35:49 2026 +0000 Added tests for make_index_sequence & make_index_sequence_with_offset commit 55da732fc828f36ef3afc074c6f3f344836471b8 Author: John Wellbelove Date: Thu Feb 19 19:23:36 2026 +0000 Renamed type_list_prepend & type_list_append to type_list_push_front & type_list_push_back respectively commit 1d47e1b731758931333bf2779b2219515998dc68 Author: John Wellbelove Date: Thu Feb 19 19:05:53 2026 +0000 Fix merge error commit 52e57bc8b6406f2580bb420fc8e8933cd715576b Merge: 56dce4a3 992348b4 Author: John Wellbelove Date: Thu Feb 19 19:03:41 2026 +0000 Merge branch 'development' into feature/Add-more-type_list-features # Conflicts: # include/etl/utility.h commit 56dce4a3aaace7372d21cbc758f49a55b99a3ad4 Author: John Wellbelove Date: Thu Feb 19 18:23:58 2026 +0000 indentation fix commit 9ebcf41e63f2419e5e4ca958581f6704470f55b0 Author: John Wellbelove Date: Thu Feb 19 13:29:11 2026 +0000 Added type_list_is_empty commit 992348b4bb2d0de2bdc5fa3d35ee83625caff69a Author: Roland Reichwein Date: Thu Feb 19 14:18:12 2026 +0100 Add constexpr to array comparison operators (#1303) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add constexpr to array comparison operators --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 226117b972996e16ac478d7ead14d216be9824b1 Author: John Wellbelove Date: Thu Feb 19 12:41:48 2026 +0000 Add etl::type_list API to more classes. (#1275) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Added etl::type_list to etl::observer * Added etl::type_list to etl::nth_type * Added missing 'typename' to type_list nth_type * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added type_list definitions for nth_type and observer * Added etl::type_list to etl::variant * Updated comments * Addedetl::type~_list to message_router, observer, visitor # Conflicts: # include/etl/observer.h # test/vs2022/etl.vcxproj.filters * Added member type_list type to tuple * Work in progress * Copy changes from other source * Removed unused tests * Fix iter_swap namespace * Add type_list functionality to etl::variant using etl::variant_from_type_list * Add type_list functionality to etl::message_packet using etl::message_packet_from_type_list * Add type_list functionality to etl::message_router using etl::message_router_from_type_list * Add type_list functionality to etl::observer using etl::observer_from_type_list * Add type_list functionality to etl::tuple using etl::tuple_from_type_list * Allow etl::make_index_sequence to be created from an etl::type_list * Add type_list functionality to etl::visitor using etl::visitor_from_type_list * Fix iter_swap namespace * Allow creation of a message_packet with no message types * Allow creation of a message_router with no message types * Updated VS2022 project files * Added missing test files CMakeLists.txt * Fix C++03 compatibility Fixed unused aregument warnings * Synced message_packet generator to updated code * Synced message_router generator to updated code * Synced message_router generator to updated code # Conflicts: # include/etl/generators/message_router_generator.h # include/etl/message_router.h * Fixed missing zero message specialisation for <= C++14 * Fixed missing zero message specialisation for <= C++14 * Fix year_month arithmetic and correct chrono API behavior (#1257) * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Restore default constructor behavior for chrono calender * Suppress warnings from std in optimized builds (#1259) When testing with ./run-tests.sh 23 3 10, some warnings from std surfaced which resulted in build errors. * Add template deduction guide for span from vector (#1264) * Create span from vector deduction * Use ivector for deduction. Add vector_ext to test * Add vector pointer to test * Finish tests * Initialize pdata_ext and others * Document how to implement platform specifics (#1262) Some interfaces need to be implemented in every project or platform using the ETL: * etl_get_high_resolution_clock * etl_get_system_clock * etl_get_steady_clock * etl_putchar Co-authored-by: John Wellbelove * Fix etl::as_bytes for etl::span (#1266) A missing 'const' in the etl::as_bytes implementation was causing a compile-time error when etl::as_bytes was called on a span of const values. Co-authored-by: John Wellbelove * Remove some UB in test_vector_non_trivial.cpp (#1268) Some of the tests' UB are detectable by Gcc15 and thus give a compile error due to warnings-as-error flag. Co-authored-by: John Wellbelove * Update C++26 deprecated constructs to ensure future standard compliance (#1267) * Update C++26 deprecated constructs to ensure future standard compliance I replaced std::is_trivial with a combination of std::is_trivially_default_constructible and std::is_trivially_copyable. Additionally, I added the required comma before the ellipsis in variadic functions to match updated language specifications. * Some additional is_trivial related changes not found directly when compiling tests in C++26 --------- Co-authored-by: John Wellbelove * Fix return value of get_token_list (#1271) Co-authored-by: John Wellbelove * Fix etl::tuple template signature error in pair assignment operator (#1265) * Fix etl::tuple template signature error in pair assignment operator * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update etl::tuple to explicitly use etl::pair or std::pair in assignment operator * Added tests for etl::tuple assignment from pair --------- Co-authored-by: Bryton Flecker Co-authored-by: John Wellbelove * Remove advance() on static spans (#1281) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Remove advance() on static spans Since the size of a static span is constant, we can't reasonably advance() on it. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add missing includes (#1286) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add missing includes Before this change, the includes needed to be done explicitly by files using basic_string_stream.h, and be included first. This was error prone, especially if includes are reordered (e.g. via the currently defined clang-format rules). --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Move comparison operators of etl::expected to namespace etl (#1287) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Move comparison operators of etl::expected to namespace etl --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Make typed_storage constructor constexpr (#1291) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Make typed_storage constructor constexpr --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * Add basic_format_arg constructor for ibasic_string (#1288) * Allow string as format arg * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added test string escaped * Add temporary string test --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei * QR Code for Github * Added etl::visitor_from_type_list * accepts(id) for empty router passes on to a sucessor * Fixed incorrect comment from 'tuple' to 'message_router' * PR review changes * PR review changes * Fixed internal constexptr flag in message_packet * Fixed unused variable in unti test --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei Co-authored-by: John Wellbelove Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com> Co-authored-by: Roland Reichwein Co-authored-by: Mike Bloom <91038685+mike919192@users.noreply.github.com> Co-authored-by: taltenbach <92919739+taltenbach@users.noreply.github.com> Co-authored-by: Bryton Flecker Co-authored-by: Bryton Flecker commit 2ba5e93d01d855f2eaf8be99719fb1bd88693c6f Author: John Wellbelove Date: Thu Feb 19 10:00:57 2026 +0000 Added etl::type_list_is_unique commit 25b88e509b35ff9df5041bff03797afa51b0111b Author: John Wellbelove Date: Thu Feb 19 09:16:13 2026 +0000 Added etl::type_list_all_of, etl::type_list_any_of, and etl::type_list_none_of commit 1b244ec4c0028fa7f8c7518bb2cdcd0094af08c3 Author: John Wellbelove Date: Wed Feb 18 20:46:21 2026 +0000 Fix link rotations for etl::tree_node (#1299) * Fixed tree node rotate Improved tree node rotate tests to test all links. * Removed trailing whitespace * Removed trailing whitespace --------- Co-authored-by: John Wellbelove commit bfbb7259e128b6fac0ac3736a8f8297533b332fd Author: Benedek Kupper Date: Mon Feb 9 22:35:13 2026 +0100 delegate: allow constructing from non-capturing lambdas Signed-off-by: Benedek Kupper commit dc0f62cc3f3ede78405ccf965a33e532c6dcfb4d Author: Marco Nilsson Date: Mon Feb 9 12:01:20 2026 +0100 Deduce underlying storage size when constructing string_ext from char[]. (#1269) * Deduce underlying storage size when constructing string_ext from char[]. This removes the need for passing sizeof(storage) to the constructor. * Add array constructors for the other string types. - u16string_ext - u32string_ext - u8string_ext - wstring_ext * Add additional constructors to match existing API. * Fix inconsistent test argument order. --------- Co-authored-by: John Wellbelove commit 13c90eb8f269caa7585993542ddc3425b8c46e0e Author: Roland Reichwein Date: Fri Feb 6 11:08:17 2026 +0100 Add support for size_t and unsigned long to etl::format (#1290) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add support for size_t and unsigned long to etl::format * Document list of supported types in etl::supported_format_types * Add further types and tests for etl::format --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 4cf97675bd017284b81d11a6db08c33b33cfca94 Author: Drew Rife Date: Fri Feb 6 04:32:54 2026 -0500 Add ref-qualifiers to basic_format_spec (#1292) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * feat: use ref-qualifiers for basic_format_spec Converted the l-value methods to ref-qualified and also added r-value ref-qualified methods. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 45b352a059fdc9f8f43879f35ff6f5ab265ea4cd Author: Marco Nilsson Date: Mon Feb 9 12:01:20 2026 +0100 Deduce underlying storage size when constructing string_ext from char[]. (#1269) * Deduce underlying storage size when constructing string_ext from char[]. This removes the need for passing sizeof(storage) to the constructor. * Add array constructors for the other string types. - u16string_ext - u32string_ext - u8string_ext - wstring_ext * Add additional constructors to match existing API. * Fix inconsistent test argument order. --------- Co-authored-by: John Wellbelove commit 43972b416ebff01d27490b6e5e0fa23b433ab5fc Author: John Wellbelove Date: Mon Feb 9 10:56:23 2026 +0000 Added etl::type_list_remove, etl::type_list_remove_if, etl::type_list_unique, etl::type_list_pop_front, etl::type_list_pop_back commit f25e6b9d07fc00860430cd6dcdb894776663a999 Author: John Wellbelove Date: Mon Feb 9 07:48:41 2026 +0000 Replaced type_list_size::value with TTypeList::size internally for better clarity. commit 81c8e351ff83ab7259a587806e1f89ffdc632392 Author: John Wellbelove Date: Sun Feb 8 21:22:07 2026 +0000 Renamed type_list_select_from_sequence to type_list_select_from_index_sequence commit fe1f19ce4dc6b763b4190049043c204e46e15030 Author: John Wellbelove Date: Sun Feb 8 10:42:03 2026 +0000 Added new type_list features Added make_index_sequence_with_offset commit 10fd81c2be8de595bf5ba326359c1c20484f4b64 Author: Roland Reichwein Date: Fri Feb 6 11:08:17 2026 +0100 Add support for size_t and unsigned long to etl::format (#1290) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add support for size_t and unsigned long to etl::format * Document list of supported types in etl::supported_format_types * Add further types and tests for etl::format --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 2a79845dd5f78043135bbfec3bc09da781d8f636 Author: Drew Rife Date: Fri Feb 6 04:32:54 2026 -0500 Add ref-qualifiers to basic_format_spec (#1292) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * feat: use ref-qualifiers for basic_format_spec Converted the l-value methods to ref-qualified and also added r-value ref-qualified methods. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 82f168c96e2fef66dfc6a772147e1c6a1689fc9f Author: John Wellbelove Date: Thu Feb 5 20:57:54 2026 +0000 Fixed unused variable in unti test commit 6cec4a39712e215e0334ecdd7ae23c46b8359dad Author: John Wellbelove Date: Thu Feb 5 11:42:09 2026 +0000 Fixed internal constexptr flag in message_packet commit ca6bbd50d0cf53ab18096e9ae92060cba855e9b3 Author: John Wellbelove Date: Thu Feb 5 11:01:51 2026 +0000 PR review changes commit 1e2b69bc958da6bd31a5ede1cbc40e48a53315ef Author: John Wellbelove Date: Thu Feb 5 10:53:08 2026 +0000 PR review changes commit 2e54c01c69d08920de4861bccdc261ca873d5a50 Author: John Wellbelove Date: Tue Feb 3 20:35:44 2026 +0000 Fixed incorrect comment from 'tuple' to 'message_router' commit fc7c80bb976264a71f0996036596d3c0ec119915 Author: John Wellbelove Date: Tue Feb 3 20:33:45 2026 +0000 accepts(id) for empty router passes on to a sucessor commit a4c2272ad6d76b6849108d6a665b143bbe1e99c1 Merge: 58619ec6 21a1f582 Author: John Wellbelove Date: Tue Feb 3 09:05:31 2026 +0000 Merge branch 'development' into feature/#1234-Add-etl--type_list-API-to-more-classes commit 58619ec6755f1d388211cf22b4042228943fff32 Author: John Wellbelove Date: Tue Feb 3 08:58:24 2026 +0000 Added etl::visitor_from_type_list commit 3826e2ab2ebb3f67c34c2c49e3bf00788b4640a4 Author: John Wellbelove Date: Wed Jan 28 22:29:52 2026 +0000 QR Code for Github commit e80623bc1a68cc385c596d136320b7ce10b38769 Author: Mike Bloom <91038685+mike919192@users.noreply.github.com> Date: Mon Feb 2 13:35:25 2026 -0500 Add basic_format_arg constructor for ibasic_string (#1288) * Allow string as format arg * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added test string escaped * Add temporary string test --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 75eb6680d69f6d2bdbe3206a6572f8cf4b725311 Author: Roland Reichwein Date: Mon Feb 2 17:43:26 2026 +0100 Make typed_storage constructor constexpr (#1291) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Make typed_storage constructor constexpr --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 353c36c393a0027cba0bcbed881b6016d2ca30ee Author: Roland Reichwein Date: Mon Feb 2 11:46:00 2026 +0100 Move comparison operators of etl::expected to namespace etl (#1287) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Move comparison operators of etl::expected to namespace etl --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit d8d41871762e4e10cd7c6550b1a69eb9086e7547 Author: Roland Reichwein Date: Sun Feb 1 11:16:41 2026 +0100 Add missing includes (#1286) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add missing includes Before this change, the includes needed to be done explicitly by files using basic_string_stream.h, and be included first. This was error prone, especially if includes are reordered (e.g. via the currently defined clang-format rules). --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 17e6167317e11aa21af69ee5af2ef64b65405f04 Author: Roland Reichwein Date: Fri Jan 23 19:33:08 2026 +0100 Remove advance() on static spans (#1281) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Remove advance() on static spans Since the size of a static span is constant, we can't reasonably advance() on it. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 012bbea249419ff5f5e49c51e9a59cc2c6a7ac72 Author: Bryton Flecker Date: Wed Jan 21 22:30:20 2026 -0600 Fix etl::tuple template signature error in pair assignment operator (#1265) * Fix etl::tuple template signature error in pair assignment operator * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update etl::tuple to explicitly use etl::pair or std::pair in assignment operator * Added tests for etl::tuple assignment from pair --------- Co-authored-by: Bryton Flecker Co-authored-by: John Wellbelove commit 8b0fd64289dc8bca0b2b009724dace726af08dad Author: Mike Bloom <91038685+mike919192@users.noreply.github.com> Date: Wed Jan 21 13:40:19 2026 -0500 Fix return value of get_token_list (#1271) Co-authored-by: John Wellbelove commit dbaffa9169d3a41fcd3d420af55e3a87d86fc3af Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Tue Jan 20 11:36:14 2026 +0100 Update C++26 deprecated constructs to ensure future standard compliance (#1267) * Update C++26 deprecated constructs to ensure future standard compliance I replaced std::is_trivial with a combination of std::is_trivially_default_constructible and std::is_trivially_copyable. Additionally, I added the required comma before the ellipsis in variadic functions to match updated language specifications. * Some additional is_trivial related changes not found directly when compiling tests in C++26 --------- Co-authored-by: John Wellbelove commit a8436506494b7c1f0478cbb12174582e2c47ccb8 Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Tue Jan 20 11:15:38 2026 +0100 Remove some UB in test_vector_non_trivial.cpp (#1268) Some of the tests' UB are detectable by Gcc15 and thus give a compile error due to warnings-as-error flag. Co-authored-by: John Wellbelove commit d419bbf16f7ad933eabbf0c6ffbaa4cbcaafe377 Author: taltenbach <92919739+taltenbach@users.noreply.github.com> Date: Sat Jan 17 23:04:52 2026 +0100 Fix etl::as_bytes for etl::span (#1266) A missing 'const' in the etl::as_bytes implementation was causing a compile-time error when etl::as_bytes was called on a span of const values. Co-authored-by: John Wellbelove commit 24421edd2952fee957ce8d5bb31f06e0352b2870 Author: Roland Reichwein Date: Sat Jan 17 14:26:16 2026 +0100 Document how to implement platform specifics (#1262) Some interfaces need to be implemented in every project or platform using the ETL: * etl_get_high_resolution_clock * etl_get_system_clock * etl_get_steady_clock * etl_putchar Co-authored-by: John Wellbelove commit 45e5668782b74f8bf99347a1a85c0c0cbd02aab3 Author: Mike Bloom <91038685+mike919192@users.noreply.github.com> Date: Fri Jan 16 03:57:09 2026 -0500 Add template deduction guide for span from vector (#1264) * Create span from vector deduction * Use ivector for deduction. Add vector_ext to test * Add vector pointer to test * Finish tests * Initialize pdata_ext and others commit 2a727b12b4b8aa5ac550fe0a5b608cfe61646a1f Author: Roland Reichwein Date: Fri Jan 16 09:51:11 2026 +0100 Suppress warnings from std in optimized builds (#1259) When testing with ./run-tests.sh 23 3 10, some warnings from std surfaced which resulted in build errors. commit 86fea52f5c29c20a7c1cb2d0fd80ded66b23e1cd Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Fri Jan 16 09:02:46 2026 +0100 Fix year_month arithmetic and correct chrono API behavior (#1257) * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Restore default constructor behavior for chrono calender commit 21a1f58299cf48e8c7325d329c386dfda438b932 Author: John Wellbelove Date: Wed Jan 28 22:29:52 2026 +0000 QR Code for Github commit b51968d6dd12d2360e34836042cafbf37d14f50c Author: Mike Bloom <91038685+mike919192@users.noreply.github.com> Date: Mon Feb 2 13:35:25 2026 -0500 Add basic_format_arg constructor for ibasic_string (#1288) * Allow string as format arg * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Added test string escaped * Add temporary string test --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit a3c8f802166d9741dee58c2be5864098ddaab1ec Author: Roland Reichwein Date: Mon Feb 2 17:43:26 2026 +0100 Make typed_storage constructor constexpr (#1291) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Make typed_storage constructor constexpr --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 570a7adaa33823b274749100cce5d81b0130f446 Author: Roland Reichwein Date: Mon Feb 2 11:46:00 2026 +0100 Move comparison operators of etl::expected to namespace etl (#1287) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Move comparison operators of etl::expected to namespace etl --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit db89cc892026db80f65d5de8b34c758ec25b4bfb Author: Roland Reichwein Date: Sun Feb 1 11:16:41 2026 +0100 Add missing includes (#1286) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Add missing includes Before this change, the includes needed to be done explicitly by files using basic_string_stream.h, and be included first. This was error prone, especially if includes are reordered (e.g. via the currently defined clang-format rules). --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit 15b96484d5095bbd1f14039bc4a5114e62a755c3 Author: John Wellbelove Date: Fri Jan 30 10:58:57 2026 +0000 Fixed missing zero message specialisation for <= C++14 commit 491c648d3ee27be899387efed768d8dc8d61de96 Author: John Wellbelove Date: Fri Jan 30 10:58:57 2026 +0000 Fixed missing zero message specialisation for <= C++14 commit 53a9cde9a4b9a453e4772a3ca3b458ec25bf119c Author: John Wellbelove Date: Fri Jan 30 09:06:54 2026 +0000 Synced message_router generator to updated code # Conflicts: # include/etl/generators/message_router_generator.h # include/etl/message_router.h commit f0372eaeaa2212c0cb959a384593dfeb978562e4 Merge: a7fe6bc6 c6006057 Author: John Wellbelove Date: Fri Jan 30 09:12:02 2026 +0000 Merge branch 'master' into feature/#1234-Add-etl--type_list-API-to-more-classes commit a7fe6bc6b0e2cba2f3bb2cfc9fa83bf1b2d7d80d Author: John Wellbelove Date: Fri Jan 30 09:06:54 2026 +0000 Synced message_router generator to updated code commit 0ad0cec3428df599501e2a7272bdc9b03a7bd673 Author: John Wellbelove Date: Thu Jan 29 10:06:42 2026 +0000 Synced message_packet generator to updated code commit ff03b2807db65273dcaad1a5a1c2ed58af90ab0a Author: John Wellbelove Date: Wed Jan 28 22:24:46 2026 +0000 Fix C++03 compatibility Fixed unused aregument warnings commit fa8f07ab800712a1233888fc52ff7e665e2a7b27 Author: John Wellbelove Date: Wed Jan 28 17:46:35 2026 +0000 Added missing test files CMakeLists.txt commit eb1216146ccba40a969e5854250504cd8020354f Author: John Wellbelove Date: Wed Jan 28 17:46:10 2026 +0000 Updated VS2022 project files commit a4ee9d01aa5ec6dd02f1f2a35750268347206678 Author: John Wellbelove Date: Wed Jan 28 17:45:29 2026 +0000 Allow creation of a message_router with no message types commit fed1274324aed6f11bf13830900c57b032878003 Author: John Wellbelove Date: Wed Jan 28 17:45:11 2026 +0000 Allow creation of a message_packet with no message types commit 21f68eb7b91938a301849da1b998e726a01ee141 Author: John Wellbelove Date: Wed Jan 28 17:42:43 2026 +0000 Fix iter_swap namespace commit bde8747be8b67f294390b0addfb1714c997570c0 Author: John Wellbelove Date: Wed Jan 28 17:42:25 2026 +0000 Add type_list functionality to etl::visitor using etl::visitor_from_type_list commit a61980660f81f51795eb8df4966a136f7825a2e8 Author: John Wellbelove Date: Wed Jan 28 17:33:32 2026 +0000 Allow etl::make_index_sequence to be created from an etl::type_list commit a4e4527669ed1bae445802f197ecc9cd5bfcb7b5 Author: John Wellbelove Date: Wed Jan 28 17:26:57 2026 +0000 Add type_list functionality to etl::tuple using etl::tuple_from_type_list commit a669d1f46ea0c1bf330343622a01d3be8bb64d69 Author: John Wellbelove Date: Wed Jan 28 17:26:20 2026 +0000 Add type_list functionality to etl::observer using etl::observer_from_type_list commit 124309947150c765bf452b81809e2b8929d72bc2 Author: John Wellbelove Date: Wed Jan 28 17:25:08 2026 +0000 Add type_list functionality to etl::message_router using etl::message_router_from_type_list commit 746761124c3080c47fc24654f1164336f3e67547 Author: John Wellbelove Date: Wed Jan 28 17:24:45 2026 +0000 Add type_list functionality to etl::message_packet using etl::message_packet_from_type_list commit 69b741adb82fe73192a62b0080b714227e443cdb Author: John Wellbelove Date: Wed Jan 28 17:22:37 2026 +0000 Add type_list functionality to etl::variant using etl::variant_from_type_list commit d7dc1281ae194cd21db2a3ca415226994b8e7239 Author: John Wellbelove Date: Wed Jan 28 17:20:01 2026 +0000 Fix iter_swap namespace commit 49d7fa80bc3924c45cca8618d79e9f82f3a1faee Author: John Wellbelove Date: Tue Jan 27 19:28:40 2026 +0000 Removed unused tests commit 947e89a6e979ee6590fa5c58e49e5376ac6998ad Author: John Wellbelove Date: Mon Jan 26 17:55:50 2026 +0000 Copy changes from other source commit 8320b35d4720a9613198fd51d61719cba582091d Author: John Wellbelove Date: Wed Dec 24 20:20:13 2025 +0000 Work in progress commit 92e33bb974b2c8d2bbd5caf16659a9efe3c571e8 Author: John Wellbelove Date: Wed Dec 24 20:02:06 2025 +0000 Added member type_list type to tuple commit c67c617d8c7a78aba872e3cbffafeae27c1593f5 Author: John Wellbelove Date: Wed Dec 24 20:01:38 2025 +0000 Addedetl::type~_list to message_router, observer, visitor # Conflicts: # include/etl/observer.h # test/vs2022/etl.vcxproj.filters commit 1c0d7a87de3ad8084034329eb5c1f26579b20e80 Author: John Wellbelove Date: Sun Jan 25 19:19:18 2026 +0100 Updated comments commit 61796bee8f7ca5043e36f180bffc97d28b722acd Author: John Wellbelove Date: Sun Jan 25 11:10:38 2026 +0100 Added etl::type_list to etl::variant commit 682b1e7011c8cd75f988e85eb9be878539f24216 Author: John Wellbelove Date: Sun Jan 25 11:09:59 2026 +0100 Added type_list definitions for nth_type and observer commit 9757860241d6a57e27abd32fab14d0e2d015ec4f Author: Roland Reichwein Date: Fri Jan 23 19:33:08 2026 +0100 Remove advance() on static spans (#1281) * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update CONTRIBUTING.md Updated the instructions for contributing. * Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Remove advance() on static spans Since the size of a static span is constant, we can't reasonably advance() on it. --------- Co-authored-by: John Wellbelove Co-authored-by: Sergei commit af1caa88fd1f2da58ed6b6fb67f0a64da7e4f347 Author: Sergei Date: Thu Jan 22 11:22:23 2026 +0200 Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. commit c600605734360f851347e0caa61c81c078886ad9 Author: Sergei Date: Thu Jan 22 11:22:23 2026 +0200 Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277) * Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`. * Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`. commit f9dc1caa94e67738f512cb9cc5dcf21cc457a2d3 Author: Bryton Flecker Date: Wed Jan 21 22:30:20 2026 -0600 Fix etl::tuple template signature error in pair assignment operator (#1265) * Fix etl::tuple template signature error in pair assignment operator * Remove AppVeyor build status badge Removed AppVeyor build status badge from README. * Update README.md * Update etl::tuple to explicitly use etl::pair or std::pair in assignment operator * Added tests for etl::tuple assignment from pair --------- Co-authored-by: Bryton Flecker Co-authored-by: John Wellbelove commit b82bf3b79d06d1b211d7fb0775eda4f86466ed1a Author: Mike Bloom <91038685+mike919192@users.noreply.github.com> Date: Wed Jan 21 13:40:19 2026 -0500 Fix return value of get_token_list (#1271) Co-authored-by: John Wellbelove commit 01a0b6391957fa31b14d3a1cc8473fe2137ee4f7 Author: John Wellbelove Date: Wed Jan 21 11:26:14 2026 +0100 Added missing 'typename' to type_list nth_type commit 2862b3b247abb2727ea6724bd456879e2bfdb111 Author: John Wellbelove Date: Wed Jan 21 09:50:15 2026 +0100 Added etl::type_list to etl::nth_type commit 2cae4966205e7c01a498afb03bddc4a1bc9a60de Author: John Wellbelove Date: Wed Jan 21 09:26:48 2026 +0100 Added etl::type_list to etl::observer commit fcd50486ce9e6249acb44f3f23ce878852024fc9 Author: John Wellbelove Date: Wed Jan 21 09:00:51 2026 +0100 Update CONTRIBUTING.md Updated the instructions for contributing. commit 2c78c3d151e8bc15ef124e9d68215fb94117c1e9 Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Tue Jan 20 11:36:14 2026 +0100 Update C++26 deprecated constructs to ensure future standard compliance (#1267) * Update C++26 deprecated constructs to ensure future standard compliance I replaced std::is_trivial with a combination of std::is_trivially_default_constructible and std::is_trivially_copyable. Additionally, I added the required comma before the ellipsis in variadic functions to match updated language specifications. * Some additional is_trivial related changes not found directly when compiling tests in C++26 --------- Co-authored-by: John Wellbelove commit 1b1145ea4eb7928c2866720b86b834ac0f0563e2 Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Tue Jan 20 11:15:38 2026 +0100 Remove some UB in test_vector_non_trivial.cpp (#1268) Some of the tests' UB are detectable by Gcc15 and thus give a compile error due to warnings-as-error flag. Co-authored-by: John Wellbelove commit 142dff245ccf0826318815a79a1faf5c1c4daa39 Author: John Wellbelove Date: Tue Jan 20 10:53:08 2026 +0100 Update README.md commit a1744add1f14c3debc91de370daaa2a51f490c6c Author: John Wellbelove Date: Tue Jan 20 10:35:02 2026 +0100 Remove AppVeyor build status badge Removed AppVeyor build status badge from README. commit 55503e0b97dc84087cf8fff6676cb51f6447b81d Author: taltenbach <92919739+taltenbach@users.noreply.github.com> Date: Sat Jan 17 23:04:52 2026 +0100 Fix etl::as_bytes for etl::span (#1266) A missing 'const' in the etl::as_bytes implementation was causing a compile-time error when etl::as_bytes was called on a span of const values. Co-authored-by: John Wellbelove commit c92dbc2fced059d790b503699b08673128aa8c2c Author: Roland Reichwein Date: Sat Jan 17 14:26:16 2026 +0100 Document how to implement platform specifics (#1262) Some interfaces need to be implemented in every project or platform using the ETL: * etl_get_high_resolution_clock * etl_get_system_clock * etl_get_steady_clock * etl_putchar Co-authored-by: John Wellbelove commit 3b1ca75ba2cc6aa313d2589f687b44035091bc92 Author: Mike Bloom <91038685+mike919192@users.noreply.github.com> Date: Fri Jan 16 03:57:09 2026 -0500 Add template deduction guide for span from vector (#1264) * Create span from vector deduction * Use ivector for deduction. Add vector_ext to test * Add vector pointer to test * Finish tests * Initialize pdata_ext and others commit 3780070bcf171a20eb382779abf4235c9430c0fa Author: Roland Reichwein Date: Fri Jan 16 09:51:11 2026 +0100 Suppress warnings from std in optimized builds (#1259) When testing with ./run-tests.sh 23 3 10, some warnings from std surfaced which resulted in build errors. commit 226caa30b5c349b1525667807c1e762c5abec9d6 Author: John Wellbelove Date: Fri Jan 16 09:47:32 2026 +0100 Changed ETL_OR_STD:: to etl:: (#1261) Co-authored-by: John Wellbelove commit 0644f9827b253bb7e3eb305e629141cad30d412f Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Fri Jan 16 09:02:46 2026 +0100 Fix year_month arithmetic and correct chrono API behavior (#1257) * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Fix & add more tests for year_month arithmetic * Minor addtions to previous commit * More missing values to be uninitialized * Update the default constructors to = default and correct default constructor tests accordingly * Restore default constructor behavior for chrono calender commit e9c2577d8e98ca9dd3a9c211cd2bb9395890978e Author: John Wellbelove Date: Sun Jan 11 18:55:00 2026 +0100 Updated release note and version commit cdd1de4b56b9e20af6ee6befc29b4efe18d59799 Author: John Wellbelove Date: Sun Jan 11 18:55:00 2026 +0100 Updated release note and version commit 14ce8a93fb13937a5247839c69ffdd1c793f417e Author: John Wellbelove Date: Sun Jan 11 18:55:00 2026 +0100 Updated release note and version commit 3206ac9feb44a22e0fb27bbbec5eecf156ee6231 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Sun Jan 11 12:05:21 2026 -0500 ivector swap (#1256) * Etl vector swap implementation * Implement swap function overload * Fix nitpicks * Add size check * Remove unnessecary etl swap overloads * Use swap_range and move range --------- Co-authored-by: John Wellbelove commit 6d6ecc9fb5f35c28e0caad63d121e5077d8599b7 Author: John Wellbelove Date: Sat Jan 10 09:46:50 2026 +0100 Add etl::inplace_function (#1251) * Imported inplace_function and invoke functionality from original branch * Fixed spelling mistake * Update test/CMakeLists.txt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/test_inplace_function.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Moved member type function_ptr to private section * Updated comments in inplace_function.h * Updated action workflows to be triggered on a pull-request based on development branch * Added suggested changes from PR reviews --------- Co-authored-by: John Wellbelove Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: John Wellbelove commit 09555434f66532e2f1e32c4e5c9a85a7a277ce03 Author: John Wellbelove Date: Thu Jan 8 23:05:46 2026 +0100 Fixed multiple definition of 'expected' commit f8ee5f450b40f4dee560546af345738d87b24aca Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Thu Jan 8 22:58:27 2026 +0100 Make code base with tests compile under gcc-14 (#1254) * Make code base with tests compile under gcc-14 * Update buffer_descriptors.h Following the same style as non-tests headers have. E.g., include/etl/intrusive_list.h & include/etl/intrusive_forward_list.h --------- Co-authored-by: John Wellbelove commit 5b99aa50b34f0f15fde01e7ecd7c9b29a2813eb1 Author: Bo Rydberg <2945606+bolry@users.noreply.github.com> Date: Thu Jan 8 21:12:43 2026 +0100 Fix syntax errors in base64 test (#1255) Co-authored-by: John Wellbelove commit 0c3dafa09e4213fe52c2c8d7f0d43b984012036f Author: littepoint <38397123+littepointR@users.noreply.github.com> Date: Sun Jan 4 18:38:09 2026 +0800 feat(mutex): Add ThreadX mutex support (#1252) * feat(mutex): Add ThreadX mutex support * fix(mutex): Fix ThreadX mutex naming and destructor issues Correct the header guard macro naming error from ETL_MUTEX_THREAD to ETL_MUTEX_THREADX Add mutex destructor to properly release resources Modify mutex creation name identifier to "etl mutex" --------- Co-authored-by: littepoint <1053049738@qq.com> commit 16389b3eea21bb7e8e07b9f1ff0dfe4088a939bf Author: Iványi Béla <91312503+ivanyib@users.noreply.github.com> Date: Thu Jan 1 10:56:25 2026 +0100 Indirect vector checks (#1239) * Check in indirect_vector::emplace_back if the vector is full, when push pop checks are requested * Add extra checks to indirect_vector * Fix emplace in indirect_vector not taking const_iterator * Fix usage of ipool::create in indirect_vector, so that there are no intermitten objects created --------- Co-authored-by: Béla Iványi commit 4f70ed532936e685affc1c2534fcf07e451471ad Merge: af8ec168 46a937fc Author: John Wellbelove Date: Fri Dec 26 07:25:56 2025 +0000 Merge branch 'development' of https://github.com/ETLCPP/etl into development # Conflicts: # test/test_optional.cpp commit af8ec168c44d50a3e3fe20e8cdd2a8e7f618677e Author: Nik Delgado <84356491+nikdelgado@users.noreply.github.com> Date: Fri Dec 26 00:01:58 2025 -0700 implement .begin() and .end() for etl::optional (#1246) Co-authored-by: nikdelgado commit 46a937fc3430c8fe990fd2cc83e9dc57a0d4bb0b Author: Nik Delgado <84356491+nikdelgado@users.noreply.github.com> Date: Fri Dec 26 00:01:58 2025 -0700 implement .begin() and .end() for etl::optional (#1246) Co-authored-by: nikdelgado commit 94d960748d1c6ec05c2947a44e3d40a9d9bb935b Author: John Wellbelove Date: Tue Dec 23 08:28:47 2025 +0000 Fixed incompatibilities with C++03 commit 16b7183eb8548f604684dd886bad5f24949d99fa Merge: 62c654c7 339f5abf Author: John Wellbelove Date: Tue Dec 23 07:35:26 2025 +0000 Merge branch 'pull-request/#1245-Fix-discrepancy-with-STL-in-max_element-and-minmax_element' into development commit 62c654c749e42c79d07990f47f0c23e7c601a327 Merge: 96e32299 819d813a Author: John Wellbelove Date: Tue Dec 23 07:17:28 2025 +0000 Merge branch 'pull-request/#1244-Fix-no-check-macros' into development commit 819d813a12b3cd2b85ab189ff7f98791263d1927 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Tue Dec 23 02:11:07 2025 -0500 Fix no check macros (#1244) commit 339f5abf0fea8de08414ae43895afe3faa29dd4d Author: John Wellbelove Date: Tue Dec 23 07:10:10 2025 +0000 Updated ignore commit 342e43e28befbfad9e565641c72e0301cb868010 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Tue Dec 23 02:09:37 2025 -0500 Fix discrepency with STL in max element and minmax element (#1245) commit 96e322993388e869b2699fb2339951fc0100e63a Author: John Wellbelove Date: Tue Dec 23 07:05:23 2025 +0000 Fixed issue with use of binary constants with C++11 in etl::format tests commit c798bd337bbcc177d06ed93cd2a83e2870acc550 Author: John Wellbelove Date: Tue Dec 23 07:04:31 2025 +0000 Revert script to full scrolling terminal style commit c8fa20620ebb219614df42d100f83150f97753df Author: John Wellbelove Date: Tue Dec 23 07:03:46 2025 +0000 Fixed C++11 issue with constexpr in exception.h commit 922cfde45379515a7f5c0087c95e3aa57d74eea6 Author: John Wellbelove Date: Mon Dec 22 21:02:54 2025 +0000 Reverted scrolling changes on test script commit 6b3e776eb52abecbcba02ec0ce332f5769add7d5 Author: John Wellbelove Date: Mon Dec 22 21:02:17 2025 +0000 Fixed filters on VS2022 project commit 62d3fa12f1d0b47bfc86282813c91c8fdfa5556d Merge: 84f037b6 636ed523 Author: John Wellbelove Date: Mon Dec 22 10:04:35 2025 +0000 Merge branch 'development' of https://github.com/ETLCPP/etl into development commit 84f037b61645c549386580b42a4c2f614b5f02be Author: John Wellbelove Date: Sat Dec 20 12:51:01 2025 +0000 Enhanced test and syntax check scripts to add non-scrolling command line header commit d98c3ac9039c88575f877c019536eb0d1a899ba4 Author: John Wellbelove Date: Thu Dec 18 08:59:42 2025 +0000 Fixed issues with unsigned to signed conversion. Added format.h to VS2022 project. Added format.h to syntax check CMakeLists.txt commit 8c90eb8ba823206405d6324422abb1c5a99d7fa8 Author: Roland Reichwein Date: Sat Dec 13 09:09:03 2025 +0100 Add etl::format (#1204) * Synchronize on C++ 17 for "Windows - STL" and "Windows - No STL" MSVC C++20 handles char* differently on iteration * Add etl::format This adds etl::format, guided by std::format, avoiding dynamic memory allocation commit f548cfc602d66d2c3125ee7f76c385938c4d1386 Author: John Wellbelove Date: Fri Dec 19 07:37:24 2025 +0000 Fixed C++ standard check for concepts commit fc951ff9e2011e8e902584c5e7fd38807ab2ce19 Author: John Wellbelove Date: Thu Dec 18 16:14:23 2025 +0000 Disabled header include if Date: Thu Dec 18 09:40:01 2025 +0000 Added concepts.h to VS2022 project. Added concepts.h to syntax check CMakeLists.txt commit e85d29b1dd077b5653a486fa7b06644874b3a3a7 Author: Roland Reichwein Date: Sat Dec 13 09:07:06 2025 +0100 Added concepts.h and tests (#1213) commit b2a4b4410c006ea5d52ef60c76bd34d9628870d0 Author: Christoph Rüthing Date: Sat Dec 13 09:26:25 2025 +0100 Spare more Resources for non-verbose Errors (#1214) * Spare more Resources for non-verbose Errors At the moment we only remove the __FILE__ in case ETL_VERBOSE_ERRORS is not set. However, we also want to remove the error text which can consume quite some resources and without the file name the line number is also not very useful. * Introduce separate ETL_MINIMAL_ERRORS to keep backwards compatability To not break runtime backwards compatability, instead of removing the text in case of ETL_VERBOSE_ERRORS not defined, we introduce a second flag ETL_MINIMAL_ERRORS which is mutually exclusive. The semantic is as follows: - ETL_VERBOSE_ERRORS: We use verbose text, file names and line numbers. - ETL_MINIMAL_ERRORS: We do not use anything. - ETL_VERBOSE_ERRORS and ETL_MINIMAL_ERRORS: Issue an error. - non defined: We use terse text without file names nor line numbers. --------- Co-authored-by: John Wellbelove commit 8d2f91de9fe743d7d5510b47c80e484c631aea81 Author: John Wellbelove Date: Sat Dec 20 10:19:24 2025 +0000 Updated test_invoke commit 702dda43735fb3deb612a00a844fe367ffc0bcfb Author: John Wellbelove Date: Sat Dec 20 09:39:50 2025 +0000 Synchronised etl::invoke_result with that in the etl::inplace_function branch commit 1f1e2c54c39edda603e883e610dc8f9a6f184e21 Author: John Wellbelove Date: Fri Dec 19 08:27:06 2025 +0000 Updated VS2022 project to include invoke.h commit 054fca0e254379b5a0e7e03a28adab1eca7a9e9a Author: John Wellbelove Date: Fri Dec 19 08:26:27 2025 +0000 Updated functional.h from the code in the inplace_function branch commit 1ac82dc83eb364e25de8e24a0d0bbd8fdc0bd304 Author: John Wellbelove Date: Fri Dec 19 08:26:07 2025 +0000 Updated invoke.h from the code in the inplace_function branch commit 552e0f8b90f677d5677427b4c00d19fa23f235dd Author: John Wellbelove Date: Thu Dec 18 16:11:35 2025 +0000 Formatting updates commit 269f3ffdfd03d7d209cf33b5856546ccb55941db Author: whitfijs-jw <58998493+whitfijs-jw@users.noreply.github.com> Date: Sat Dec 13 03:04:38 2025 -0500 Topic/expected monadic operations (#1219) * topic/expected-monadic-operations: - added and_then, or_else, transform, and transform_error with simple tests * topic/expected-monadic-operation: - added void TValue specialization operations - updated unit tests to include expected - added is_expected to expected.h, used in and_then to ensure that the returned type is an expected * topic/expected-monadic-operations: - made implementation c++11 compatible * topic/expected-monadic-operations: - started addressing coderabbit feedback * topic/expected-monadic-operations: - adapted invoke to etl - reworked return type deduction - filled in or_else unit tests to be more complete - still need to add invoke unit tests * topic/expected-monadic-operations: -c++14 compliance * topic/expected-monadic-operations: - completed coderabbit suggestions * topic/expected-monadic-operations: - formatting in invoke and expected - added test suite for invoke * topic/expected-monadic-operations: - fixed missing moves for const TValue&& and const TError&& * topic/expected-monadic-operations: - made everything c++11 compatible, very verbose as a result * topic/expected-monadic-operations: - fixed code rabbit rewivew for move semantics in const && overloads * topic/expected-monadic-operations: - moved around a move * topic/expected-monadic-operations: - added etl:: to invoke_result calls that were missing it * topic/expected-monadic-operations: - formatting * topic/expected-monadic-operations: - added invoke for void f() calls for consistency * topic/expected-monadic-operations: - reworked entire thing to be able to handle expected to expected without even more code duplication * topic/expected-monadic-operations: - added trailing return type to maintain c++11 compatibility * topic/expected-monadic-operations: - fixed mismatch between deduced type and return for a few functions * topic/expected-monadic-operations: - replaced calls to get and get with get and get --------- Co-authored-by: Jon Whitfield commit 520b4a9f46b7594d2dd56a747320143aec1e2e83 Author: John Wellbelove Date: Sun Dec 21 07:31:06 2025 +0000 Removed redundant semicolon from TEST_SUITE block commit 0d792ef13b20abf6873b57c7057876446be2e3ee Author: Iványi Béla <91312503+ivanyib@users.noreply.github.com> Date: Sat Dec 13 09:28:29 2025 +0100 Exception std based option (#1232) * Add ability to derive etl::exception from std::exception * Only add test for exception std base when using STL * Use ETL_NOEXCEPT macro to define a function as noexcept * Rename macro to keep in line with common style * Add using_std_exception to etl::traits --------- Co-authored-by: Béla Iványi commit 3c36e696f561c68586d1f4799b879cafddf55b43 Author: Roland Reichwein Date: Sat Dec 13 08:34:24 2025 +0100 Bugfixes for compile errors in optimized tests (#1235) * Fix optimized tests by suppressing warning from STL * Fix uninitialized buffer in hash for month_weekday * Fix overlapping memcpy with memmove * Fix random out of bounds index in __builtin_memmove Suppressing compiler warning * Fix array bounds warnings from static casts in message_router In compiled code, casting to wrong message types is generated, even though the code paths are supposed to be never taken due to runtime msg id checks. Therefore, the warnings can be suppressed. * Fix syntax errors in base64 decoder tests * Fix test failure in test_rounded_integral_division.cpp when optimized When building tests optimized, test_round_to_half_even_signed_limits fails due to the fact that etl::absolute(std::numeric_limits::min()) < 0 commit 636ed523bd7c6880366ee9498e4a61df1a724af6 Author: John Wellbelove Date: Sat Dec 20 12:51:01 2025 +0000 Enhanced test and syntax check scripts to add non-scrolling command line header commit 8918cab50a620094ac40773cf681e81425632cfe Merge: 33f7bbc4 8f3db74b Author: John Wellbelove Date: Sat Dec 20 10:42:55 2025 +0000 Merge branch 'pull-request/#1238-Various-cleanup' of https://github.com/ETLCPP/etl into pull-request/#1238-Various-cleanup commit 33f7bbc43de4b7917c275a530d274c8a950cad44 Author: Roland Reichwein Date: Sat Dec 13 08:46:14 2025 +0100 Various cleanup (#1238) * Fix typo for remainder in rounded_integral_division.h * Use etl::make_unsigned instead of std::make_unsigned * Fix divide_round_half_down and divide_round_half_odd commit 6f11b19cfa457f1099e35e3d8f302ff6f6b9b955 Author: John Wellbelove Date: Wed Dec 17 09:55:35 2025 +0000 Remove legacy VS2019 project commit cb2b3fe6f4e778e1bbe5d608ce790b43f9fca3f0 Author: John Wellbelove Date: Tue Dec 16 10:41:53 2025 +0000 Added --pedandic-errors and -Werror to CMakeLists.txt commit d884719098fb2ce1c284771a3a5c0ba2469c41d2 Author: John Wellbelove Date: Tue Dec 16 09:15:26 2025 +0000 Fixed all 'extra semicolon' warnings commit 8f3db74be87990c8cb420b3898c97380e99b19bf Author: Roland Reichwein Date: Sat Dec 13 08:46:14 2025 +0100 Various cleanup (#1238) * Fix typo for remainder in rounded_integral_division.h * Use etl::make_unsigned instead of std::make_unsigned * Fix divide_round_half_down and divide_round_half_odd commit 558c04b0a0d6714a319e99f50d89048e5686c9d2 Author: John Wellbelove Date: Wed Dec 10 18:35:45 2025 +0000 Added for C++23 clang commit 0744ee698901a117be618142a9a8e1fe00a1319c Author: John Wellbelove Date: Wed Dec 10 08:22:45 2025 +0000 Added type_traits to test_memory commit 6ebd24578bdbe42925d649edd4a4f15b8059a76a Author: John Wellbelove Date: Tue Dec 9 09:34:07 2025 +0000 Don't test deprecated has_denorm in C++23 and above commit 9eb17369c470c70c977f26c9069f3d652c52a175 Author: John Wellbelove Date: Tue Dec 9 09:34:07 2025 +0000 Don't test deprecated has_denorm in C++23 and above commit 338d0a4cf5795dd555683839ff99f6fa86ecd9e8 Author: John Wellbelove Date: Tue Dec 9 09:34:07 2025 +0000 Don't test deprecated has_denorm in C++23 and above commit 868eaa2b79b4e2471e3147917441f7737089ffcc Author: John Wellbelove Date: Tue Dec 9 09:11:07 2025 +0000 Changed Github CI to use macos-15 commit 133d065bf19ca382565c90ecff736d6ad9d1b0ac Author: John Wellbelove Date: Tue Dec 9 08:58:07 2025 +0000 Updated release notes commit 1039327148075cc4bfde88acea1a31fbd8ca7150 Author: John Wellbelove Date: Tue Dec 9 08:57:23 2025 +0000 Minor comment and project file change commit 31b658ba81b4b6cc55d5d0e98cda7d2030f317d1 Author: John Wellbelove Date: Mon Dec 8 09:11:17 2025 +0000 Improve implementation of traits for functions commit 57c50fce8946bd012bf6895980fbb6230dc63d5f Author: John Wellbelove Date: Mon Dec 8 09:10:22 2025 +0000 Updated misleading template parameter names commit 3525c63b54a68c80b155607b39fab97d9ae167c5 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Mon Dec 8 04:07:29 2025 -0500 Bugfix: Issue 1212 span constructor (#1231) * Quick fix for issue 1212 * #if macro around std array uses * Fix macro placement * Maybe size_t * Maybe SIZE_ * Check if old boost style works * Fix angle brackets * Cleanup traits and add const constructors * Add traits to C++03 constructors commit 743ed78223c77ea7e3353d8476f386488f5e5743 Merge: 81a643b9 1128414d Author: John Wellbelove Date: Thu Dec 4 08:25:39 2025 +0000 Merge branch 'development' commit 1128414d21959f942f9df6f5ceb5ebf8bf6279ab Author: John Wellbelove Date: Thu Dec 4 08:15:24 2025 +0000 Synced type_traits generator commit 1f15e86ebf16bc9ac97bf1e75fd5bd657faf8288 Author: John Wellbelove Date: Thu Dec 4 08:11:50 2025 +0000 Updated version and release notes commit f5f76165ef6edb5569e5ee7476497cdb4c934e1d Author: John Wellbelove Date: Thu Dec 4 08:11:11 2025 +0000 Replaced locally defined logical_not_t with etl::negation commit 7fd0360664637e4693b36d10f07c732dc3d46ef2 Author: John Wellbelove Date: Thu Dec 4 07:47:39 2025 +0000 Replaced locally defined logical_not_t with etl::negation commit 3c64940e909762ab38fbf953f61dba6651613fc7 Author: John Wellbelove Date: Wed Dec 3 09:07:27 2025 +0000 Fixed C++03 compatibility Updated type_traits generator commit 34abed35b062a63c24f86e9c536203b69fbc2241 Author: John Wellbelove Date: Tue Dec 2 17:13:10 2025 +0000 Synchronised generators with source files commit ea73cde70b012ac31ce6b90e2253ad3d6cf1d089 Author: raitraak-rrk Date: Tue Dec 2 21:34:06 2025 +1100 variant_legacy.h: Rename template parameters (#1229) * Bugfix: Fixed span reinterpret_as should return fixed span (#1210) * Fixed span reinterpret should also return fixed span * Use auto instead of CTAD * variant_legacy.h: Rename template parameters * Allows compatibility with legacy libraries defining U8 similar to uint8_t (e.g. Segger). --------- Co-authored-by: mike919192 <91038685+mike919192@users.noreply.github.com> commit ee820f07424b46a44525b792f543b2e5adbc581a Author: John Wellbelove Date: Sat Nov 29 09:29:12 2025 +0000 #1228u nused parameter 'secure' Also fixed for 'truncated' commit cb25fdfff5fd581af698f04587e883ea646552a5 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Sat Nov 29 04:41:54 2025 -0500 Bugfix: Fixed span reinterpret_as should return fixed span (#1210) * Fixed span reinterpret should also return fixed span * Use auto instead of CTAD commit 79afa52c1e5245cdf2989a4859acb7c999c273e3 Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Sat Nov 29 03:54:17 2025 -0600 Catch reentrant calls to FSM and HFSM start, receive, etc. (#1202) * Added mechanism to catch reentrant calls to methods that could change states in FSM/HFSM * Added missing include for HFSM unit tests * Fixed error text spacing * Disabled move/copy semantics for reentrancy guard * Updated FSM generator * Made move semantics only available for C++11 and higher --------- Co-authored-by: John Wellbelove commit 81a643b9b53c20ee8626f27e06aa24a0ec434cae Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Sat Nov 29 04:41:54 2025 -0500 Bugfix: Fixed span reinterpret_as should return fixed span (#1210) * Fixed span reinterpret should also return fixed span * Use auto instead of CTAD commit 79b41c85afa9f46d554194c84e467876cf13052e Author: Iványi Béla <91312503+ivanyib@users.noreply.github.com> Date: Sat Nov 29 10:38:10 2025 +0100 Fix is_truncated in basic_string (#1223) Co-authored-by: Iványi Béla commit efd5c5741961ddb6b7f944dbd13d8606b44083d3 Author: Roland Reichwein Date: Thu Nov 27 09:54:13 2025 +0100 Change generators to reflect changes in fsm.h and type_traits.h (#1211) Previous changes were wrongfully made in fsm.h and type_traits.h instead of in their generator counterparts. Add CI check to ensure generated files are in sync. commit a6f4c0b4d10fcd7831ee8fc7da6704b4e83175dd Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Thu Nov 27 03:52:37 2025 -0500 Basic string checks (#1222) * Add checks for index, front, back, and insert * Add erase checks * Add tests to string_char * Add u16 tests * Add tests to string u32 * Add u8 tests * Add wchar tests * Use size() for back functions. Fix some uses of buffer2 * Add assert for swapped insert iterators. Add tests commit 14e3b9d11edd80755e19d356df39905f16f7465f Author: Roland Reichwein Date: Thu Nov 27 09:50:39 2025 +0100 Cleanup platform.h includes, add missing test for unaligned_type (#1218) * platform.h include cleanup * Add test for implicit value conversion in unaligned_type commit 78f04ad2982a11a7a9f0166526726ca151c8fbef Author: Helder Duarte Date: Thu Nov 27 08:48:27 2025 +0000 Fix value_or not taking const in optional (#1225) commit e5dd953c8b5a7792469259c25571a10401581f2c Author: lschneidercor Date: Thu Nov 27 09:47:50 2025 +0100 Add missing include to optional (#1226) When the initializer list is not included, the default std::initializer list is used and ETL_NO_STL would be ignored. commit 2f535d385f4e6a29e3f1e6ef9d4c2f6cbb002a24 Author: Roland Reichwein Date: Wed Nov 12 19:05:20 2025 +0100 Add test for swap (#1221) commit 43d3f0e89ca54e860b993f03e569f490695b7bb8 Author: Filipe Cuim <87344176+filipe-cuim@users.noreply.github.com> Date: Tue Nov 11 19:12:39 2025 +0000 Add const specialization for etl::get_object_at (#1217) Signed-off-by: Filipe Cuim commit b6e78b7c9cd8628da954eb5873990fd2468481a0 Author: John Wellbelove Date: Sun Oct 19 18:40:58 2025 +0100 Updated etl::array and etl::delegate Updated release nots and version commit bb24ea21641909ac36011a2996983c316e961a8c Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Sun Oct 19 12:10:32 2025 -0400 Fix array noexcept expr (#1208) commit a025d0cc68d778b5f78a42b1a5494533c4f347c1 Author: John Wellbelove Date: Wed Oct 15 08:33:38 2025 +0100 Update version and release notes commit 817f2ab99e85a7d824491e6598b4e99753dee11f Author: John Wellbelove Date: Tue Oct 14 18:03:14 2025 +0100 Update version and release notes commit 4b8ab3eeda06f7779c6ee71e36bfa70a517d42a0 Author: John Wellbelove Date: Mon Oct 13 23:02:45 2025 +0100 Added type_list_has_duplicates_of and type_list_count_of commit c7d26826596c2a768c161344f7c11740068ff7eb Author: John Wellbelove Date: Mon Oct 13 22:31:33 2025 +0100 Added macro settings commit 02b0de1ae9a422ed6a7dc399cb1ba6bda55f912e Author: John Wellbelove Date: Mon Oct 13 17:42:27 2025 +0100 Added extra static assert checks for functors and lambdas commit e0e7155d63ed5afe5cc5917305b8da32b8a7489d Merge: 23d78d5d 41472162 Author: John Wellbelove Date: Mon Oct 13 17:37:56 2025 +0100 Merge branch 'pull-request/#1188-etl-array-checks' into development commit 41472162311e0896402998fb56435dff52b6b9ef Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Mon Oct 13 12:34:34 2025 -0400 etl::span checks (#1201) * Implement checks * handle cpp11 constexpr exceptions * Cant use local variables * Tests should be implemented * Try to fix msvc * Fix etl error text commit 23d78d5dc7b9c60b38daa088ab2f91427fea475b Merge: 532c9737 30ccdea6 Author: John Wellbelove Date: Sun Oct 12 11:05:45 2025 +0100 Merge branch 'hotfix/#1203-Potential-issue-with-forwarding-in-etl--delegate' into development commit 30ccdea62974fffa0e416c9926b295cf1b9ae829 Author: John Wellbelove Date: Sun Oct 12 11:05:30 2025 +0100 Opimisation of delegate invocations commit 532c9737b79da9fd28752966c63640c9bbcdb606 Merge: 399899bb 16060ee0 Author: John Wellbelove Date: Sat Oct 11 16:37:39 2025 +0100 Merge branch 'hotfix/Fix-usage-of-noexcept' into development # Conflicts: # include/etl/platform.h commit 399899bbe24f453d07febf9592457559e9bae0b3 Author: John Wellbelove Date: Sat Oct 11 16:30:28 2025 +0100 Updated version commit 3f7b18e3c2289eb3c44f1203ef1a542092c6d6cf Author: John Wellbelove Date: Sat Oct 11 11:22:16 2025 +0100 Changed result of etl::is_constant_evaluated() in test_is_constant_evaluated from const to constexpr. commit 85678586c4f1e328e135078662f01d299031f2db Merge: 04707121 07894526 Author: John Wellbelove Date: Sat Oct 11 11:01:53 2025 +0100 Merge branch 'pull-request/#1199-Added-support-for-transitions-on-state-enter-for-HFSM' into development commit 07894526e03dc5075318d8acf6b40f697889a842 Author: John Wellbelove Date: Sat Oct 11 11:01:35 2025 +0100 Added test_hfsm_recurse_to_inner_state_on_start.cpp to project commit 047071211ca61596fefd1fe58f8ef2d8d50a736e Merge: 11c509bb 6ab05a5d Author: John Wellbelove Date: Sat Oct 11 10:51:19 2025 +0100 Merge branch 'pull-request/#1012-Implement-Signal' into development # Conflicts: # test/vs2022/etl.vcxproj.filters commit 11c509bb4465dd916743ba9455bd8e832aa87613 Merge: b328d067 f9982a6f Author: John Wellbelove Date: Sat Oct 11 10:47:46 2025 +0100 Merge branch 'pull-request/#1196-Added-back-in-support-for-populating-non-8-bit-strings-with-8-bit-data' into development commit b328d067461c69a021be6cc2a6b1b52064b22566 Merge: 115e0e91 05731c27 Author: John Wellbelove Date: Sat Oct 11 10:35:38 2025 +0100 Merge branch 'pull-request/#1198-Add-etl--is_constant_evaluated' into development commit 115e0e91a261e699024f986b90acb62d945fd1fb Author: John Wellbelove Date: Fri Oct 10 09:51:11 2025 +0100 Removed redundant member function commit 6ab05a5d7eb71bd7967d2cdf059efed5bcff82ef Author: John Wellbelove Date: Sun Sep 21 10:06:12 2025 +0100 Rebased on development commit fa10567482dd3168d0fc631a4351446a3472c958 Author: John Wellbelove Date: Sat Oct 4 08:02:17 2025 +0100 Restore ETL_NOEXCEPT_FROM missing from merges commit d14f7a66a9ce41561a0c9f0f38b85c88ed104448 Author: John Wellbelove Date: Wed Sep 17 20:44:52 2025 +0100 Added and fixed noexcept attributes Added ETL_NOEXCEPT_FROM to set noexcept attributes based on an object or function. # Conflicts: # include/etl/platform.h commit 07734033d31a178a0a44ef74b6baade4b8a82f80 Author: John Wellbelove Date: Fri Oct 3 10:18:21 2025 +0100 Minor layout changes commit 1ea45ff28efc97ffdb52f2cb57b5dc1ebc9b3f54 Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Fri Oct 3 02:44:16 2025 -0500 Added conditional support of `noexcept` to fix IAR support (#1195) commit 99a33535d371ba400c0f42d912d9811d6c23ee14 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Fri Oct 3 05:10:15 2025 -0400 Vector checks (#1193) * Add checks to vector and fix test failures * Add tests to vector * Add tests to external buffer and non trivial * All tests should be implemented * Add checks to vector_pointer and vector_pointer_ext * Get bad iterators from a second vector commit d2e0b07791b1a6b6288bae71df182ff5108852c5 Author: Igor Pugachev Date: Fri Oct 3 09:54:12 2025 +0200 fix variant_variadic documentation (#1194) * fix variant_variadic default constructor documentation * fix valueless doc commit a25f195637d519095e9e7b6b5e6fb809b98b560b Author: John Wellbelove Date: Thu Oct 2 08:28:50 2025 +0100 Renamed ETL_ASSERT_UNTYPED to ETL_ASSERT_GENERIC commit d456c785897ce573dcb30c3fa64ec9f04c12d351 Author: John Wellbelove Date: Thu Oct 2 07:45:54 2025 +0100 Fixed indentation Removed unused ETL_ASSERT commit 9c3e786509b1b29940003aa850778740e711626d Author: John Wellbelove Date: Wed Oct 1 18:58:27 2025 +0100 Added missing CI scripts to the project commit ad1679ff93b96c7725676458dbf8517f29b3f1b3 Author: Christoph Rüthing Date: Wed Oct 1 19:43:52 2025 +0200 Introduce Cast to void for Condition of Assert (#1191) * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Introduce Cast to void for Condition of Assert Currently, in case we use a parameter of a function _only_ inside of an ETL_ASSERT and the ETL configuration disables the ETL_ASSERT, we get a compiler warning about an unused parameter. Therefore, this change casts the condition of ETL_ASSERT to void. * Use sizeof to avoid evaluation of Expression In case we disable ASSERTs in e.g. non debug builds, we want to expand it to "nothing", similar to how the std assert works. Introducing a cast to void on the conidition would still evaluate it and potentially cause side-effects. Therefore, we use the sizeof operator to ensure the expression is not evaluated in case ASSERTs are disabled. --------- Co-authored-by: John Wellbelove Co-authored-by: Marco Nilsson Co-authored-by: John Wellbelove commit 9e0121125fd7190e5f2ab47722e94d44b7eaf237 Author: Christoph Rüthing Date: Sun Sep 28 12:10:50 2025 +0200 Allow easy Creation of Generic Exceptions with just a Text (#1192) * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Allow easy Creation of Generic Exceptions with just a Text Today when using ETL_ASSERT you need to pass a concrete exception type. However, it can be quite unhandy to define a custom exception type for each assert, therefore we want to also allow to simply use the generic etl::exception type and directly provide the message. --------- Co-authored-by: John Wellbelove Co-authored-by: Marco Nilsson Co-authored-by: John Wellbelove commit 32a2e78d79660d3f1028b7a20a3a6c04c1dde834 Author: Christoph Rüthing Date: Sat Sep 27 11:28:57 2025 +0200 Enforce Semicolon after ETL_ASSERT (#1190) * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Enforce Semicolon after ETL_ASSERT --------- Co-authored-by: John Wellbelove Co-authored-by: Marco Nilsson Co-authored-by: John Wellbelove commit a2415cc30fb9ae1165790b56a78a77e7c6026854 Author: John Wellbelove Date: Wed Sep 10 14:34:06 2025 +0100 Removed #define ETL_DEBUG as this is a project define commit f2c33a446646267176be1bacec039cbfaf9e2b13 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Wed Sep 10 05:52:22 2025 -0400 Debug assert (#1175) * debug assert POC * Swith to ETL_CONSTEXPR14 * Finish TODO checks * First and last can be equal * Add ETL_DEBUG_THROW_EXCEPTIONS * Try allowing c++11 constexpr * Add macro for throwing from c++11 constexpr * Remove braces * Add extra asserts in size_t overload functions * Fill out debug asserts * Line up comments commit da5e42a4bc0eb64be3e2adfcc996302cd24c3ab6 Author: John Wellbelove Date: Fri Sep 12 12:48:18 2025 +0100 Moved and renamed common class to base commit 8dff499500d2e2a373b30df503801f42a1679dfa Author: John Wellbelove Date: Fri Sep 12 12:47:51 2025 +0100 Added insert/remove tests commit 947f9e523bfece54d077f66c9a1e40d13d3c0b8e Author: John Wellbelove Date: Fri Sep 12 12:47:18 2025 +0100 Changed timer to match the internal layout of other timers commit 21d7ebe879983c78f382dfb32e14eeb4d8a3dce5 Author: John Wellbelove Date: Thu Sep 11 19:28:03 2025 +0100 Added insert and remove timer callback tests to test_message_timer_interrupt and test_message_timer_locked commit 793bafa1b40119273bdfd748bba51734bcbfb877 Author: Mario Luzeiro Date: Thu Sep 11 18:38:48 2025 +0100 Added callbacks when a timer is inserted or removed (#1155) commit c13d01319e2302efa99161aa3a82ee45c62a4bfa Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Tue Sep 23 11:26:19 2025 -0400 etl array checks (#1188) * Regression fix: Support zero arguments emplace() in etl::optional (#1183) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Support zero arguments emplace() in etl::optional For non-fundamental types, a recent change in etl::optional was introduced that doesn't support zero arguments emplace() anymore. This change fixes it and adds the respective test. --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife * Fix etl::typed_storage by supporting omitted destructors (#1182) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Fix etl::typed_storage by supporting omitted destructors In a recent change to alignment.h, the etl::typed_storage was changed in a way that in case of an already constructed object, the object is created via assignment. However, this contradicts the original use case that led to etl::typed_storage in the first place: https://github.com/ETLCPP/etl/pull/1023 The goal is to omit destructors (and at the same time support classes with deleted assignment operators), so they can be optimized out at link time. This change reverts commit ac7b268 to restore the original functionality and changes the test to reflect the original use case. * Fix missing create() in non-C++11 typed_storage_ext constructor * Typo fix --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove * removed navis file from project * Updated version and release notes * Removed forced unsigned int cast in type_def bit-shift operators (#1178) * Removed UB in type_def bit-shift operators * Changed shift operators to allow both signed and unsigned operands for shifts This allows the library user to explicitly use unsigned values to avoid UB * Fixed constexpr errors for CPP11 * Changed is_arithmetic checks to use is_integral since valid shifts require integral operands * Removed need for CPP11 since changes are CPP03 compatible * Delete project navis files * Add force CI check on piull requests * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Re architect the extra checks * Add CHECK_EXTRA * Fix newline at end of file * The check index macro also needs to be defined to throw * Remove ETL_VERBOSE_ERRORS macros --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove Co-authored-by: David Ockey <2897027+ockeydockey@users.noreply.github.com> Co-authored-by: Marco Nilsson commit df6b0b20c8873da95d0c0de733a48c10c40ce161 Author: John Wellbelove Date: Mon Sep 22 10:41:50 2025 +0100 Modified to use new ETL_ASSERTs commit abc2735504c94c9d908b19ac1f3e4be8c2e4ed13 Author: John Wellbelove Date: Wed Sep 10 14:34:57 2025 +0100 Added more ETL_NOEXCEPT to etl::array commit da32625f1047bc9f7a5136ae3dde239301b2b9e8 Author: John Wellbelove Date: Wed Sep 10 14:34:06 2025 +0100 Removed #define ETL_DEBUG as this is a project define commit 5b76824c6112f44019ca0ed93930c3be6cbf955a Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Wed Sep 10 05:52:22 2025 -0400 Debug assert (#1175) * debug assert POC * Swith to ETL_CONSTEXPR14 * Finish TODO checks * First and last can be equal * Add ETL_DEBUG_THROW_EXCEPTIONS * Try allowing c++11 constexpr * Add macro for throwing from c++11 constexpr * Remove braces * Add extra asserts in size_t overload functions * Fill out debug asserts * Line up comments commit f9982a6fde687551d576ff85f0ef12853d6d2eea Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Wed Oct 8 03:39:26 2025 -0500 Added back in support for populating non 8-bit strings with 8-bit data (#1196) * Fixed ability to populate 16-bit strings with 8-bit data * Added more unit tests * Fixed C++11 build errors * Changed testing to accommodate C++11 better * Cleaned up comments * Cleaned up tests to be more consistent * Make template matches mutually exclusive to prevent ambiguous behavior * Added changes to u32 and wchar strings * Changed const range tests to use const string commit 05731c27864d19c38eb9125eb63d298f9334e6f7 Author: Roland Reichwein Date: Wed Oct 8 10:32:43 2025 +0200 Add etl::is_constant_evaluated (#1198) Co-authored-by: John Wellbelove commit 86b9e0903f88f6547bc4224594db095d3aecf640 Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Wed Oct 8 02:43:09 2025 -0500 Added support for transitions on state enter for HFSM (#1199) * Added support for transitions on state enter for HFSM * Fixed unit test build error * Comment clean-up * Changed FSM so that self-transitions can also transition "on enter" * Fixing C++03 build error for clang commit 85fc48302d2ea386d391854c28d5e1dca30cf2cb Merge: 421edaf1 2c170118 Author: John Wellbelove Date: Sat Oct 4 08:08:10 2025 +0100 Merge branch 'pull-request/#1188-etl-array-checks' into development commit 421edaf165b2401f0384745156b9b45cc2f4da6a Merge: 27a19f5c d21b0a27 Author: John Wellbelove Date: Sat Oct 4 08:07:47 2025 +0100 Merge branch 'pull-request/#1195-Added-conditional-support-of-noexcept-to-fix-IAR-support' into development commit 2c170118ffb0ff569f48b95cabc8f7b369f7a5f1 Merge: 27a19f5c 44e75162 Author: John Wellbelove Date: Sat Oct 4 08:05:58 2025 +0100 Merge branch 'pull-request/#1188-etl-array-checks' of https://github.com/ETLCPP/etl into pull-request/#1188-etl-array-checks commit d21b0a27f0310867dc765ac7cac81e51d521206b Author: John Wellbelove Date: Sat Oct 4 08:02:17 2025 +0100 Restore ETL_NOEXCEPT_FROM missing from merges commit ed718a97e9aea99649b9140a9b410d45e4930c6a Author: John Wellbelove Date: Wed Sep 17 20:44:52 2025 +0100 Added and fixed noexcept attributes Added ETL_NOEXCEPT_FROM to set noexcept attributes based on an object or function. # Conflicts: # include/etl/platform.h commit 24e603b27d83a549e4245eec5d25d5f7bc689139 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Fri Oct 3 05:10:15 2025 -0400 Vector checks (#1193) * Add checks to vector and fix test failures * Add tests to vector * Add tests to external buffer and non trivial * All tests should be implemented * Add checks to vector_pointer and vector_pointer_ext * Get bad iterators from a second vector commit e1126aafd2903d0411693ab72aa4266eb14209e5 Author: Igor Pugachev Date: Fri Oct 3 09:54:12 2025 +0200 fix variant_variadic documentation (#1194) * fix variant_variadic default constructor documentation * fix valueless doc commit 27a19f5c52fedd3c77d354810e5febb65ab73aa6 Author: John Wellbelove Date: Sat Oct 4 08:02:17 2025 +0100 Restore ETL_NOEXCEPT_FROM missing from merges commit d0feb3d175f00103bed349380e94c00342937053 Author: John Wellbelove Date: Wed Sep 17 20:44:52 2025 +0100 Added and fixed noexcept attributes Added ETL_NOEXCEPT_FROM to set noexcept attributes based on an object or function. # Conflicts: # include/etl/platform.h commit b90bcaaaabc815bdfb26bc0a906bd95e7b0cf79a Author: John Wellbelove Date: Fri Oct 3 10:18:21 2025 +0100 Minor layout changes commit 0323dabeffdef8ddc5d2ae33a113f201acfb13c7 Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Fri Oct 3 02:44:16 2025 -0500 Added conditional support of `noexcept` to fix IAR support (#1195) commit 2bf512dd42294b9cae29638b995dab0eae9c5575 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Fri Oct 3 05:10:15 2025 -0400 Vector checks (#1193) * Add checks to vector and fix test failures * Add tests to vector * Add tests to external buffer and non trivial * All tests should be implemented * Add checks to vector_pointer and vector_pointer_ext * Get bad iterators from a second vector commit b38feb17b55d078cdb15a2bdd41952b2499ab830 Author: John Wellbelove Date: Fri Oct 3 10:18:21 2025 +0100 Minor layout changes commit 44e75162787933f14bfe2e440756ed0a98e299eb Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Fri Oct 3 05:10:15 2025 -0400 Vector checks (#1193) * Add checks to vector and fix test failures * Add tests to vector * Add tests to external buffer and non trivial * All tests should be implemented * Add checks to vector_pointer and vector_pointer_ext * Get bad iterators from a second vector commit 077590838b8df7eb9f2ee55543f5c5f153d2a807 Author: Igor Pugachev Date: Fri Oct 3 09:54:12 2025 +0200 fix variant_variadic documentation (#1194) * fix variant_variadic default constructor documentation * fix valueless doc commit 15cbb12e4b88ddfab6a0b931b514b8b6dfed33fb Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Fri Oct 3 02:44:16 2025 -0500 Added conditional support of `noexcept` to fix IAR support (#1195) commit bcf7a95bb67ed147fdee4700dea2e49300175c51 Author: John Wellbelove Date: Thu Oct 2 08:28:50 2025 +0100 Renamed ETL_ASSERT_UNTYPED to ETL_ASSERT_GENERIC commit a9265b1a719141c08ee13283ec4ccf613ee10033 Merge: 081b693e f7cdf1bc Author: John Wellbelove Date: Thu Oct 2 08:15:17 2025 +0100 Merge branch 'pull-request/#1191-Introduce-Cast-to-void-for-Condition-of-Assert' into development # Conflicts: # include/etl/error_handler.h commit f7cdf1bc3f847d09cab562297d5a9fff03c2ca68 Author: John Wellbelove Date: Thu Oct 2 07:45:54 2025 +0100 Fixed indentation Removed unused ETL_ASSERT commit 07bf063daa502e0b1e6a53df11b88e32047cb871 Author: John Wellbelove Date: Wed Oct 1 18:58:27 2025 +0100 Added missing CI scripts to the project commit 018c7ce849453ac50b6a5c6d39d4ce56a16d25fe Author: Christoph Rüthing Date: Wed Oct 1 19:43:52 2025 +0200 Introduce Cast to void for Condition of Assert (#1191) * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Introduce Cast to void for Condition of Assert Currently, in case we use a parameter of a function _only_ inside of an ETL_ASSERT and the ETL configuration disables the ETL_ASSERT, we get a compiler warning about an unused parameter. Therefore, this change casts the condition of ETL_ASSERT to void. * Use sizeof to avoid evaluation of Expression In case we disable ASSERTs in e.g. non debug builds, we want to expand it to "nothing", similar to how the std assert works. Introducing a cast to void on the conidition would still evaluate it and potentially cause side-effects. Therefore, we use the sizeof operator to ensure the expression is not evaluated in case ASSERTs are disabled. --------- Co-authored-by: John Wellbelove Co-authored-by: Marco Nilsson Co-authored-by: John Wellbelove commit 4cbc601a69d8acc980e476eda8607a80845e59cc Author: Christoph Rüthing Date: Sun Sep 28 12:10:50 2025 +0200 Allow easy Creation of Generic Exceptions with just a Text (#1192) * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Allow easy Creation of Generic Exceptions with just a Text Today when using ETL_ASSERT you need to pass a concrete exception type. However, it can be quite unhandy to define a custom exception type for each assert, therefore we want to also allow to simply use the generic etl::exception type and directly provide the message. --------- Co-authored-by: John Wellbelove Co-authored-by: Marco Nilsson Co-authored-by: John Wellbelove commit 813e26e3b48c03cfd6984c10762d4e689eccb9cd Author: Christoph Rüthing Date: Sat Sep 27 11:28:57 2025 +0200 Enforce Semicolon after ETL_ASSERT (#1190) * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Enforce Semicolon after ETL_ASSERT --------- Co-authored-by: John Wellbelove Co-authored-by: Marco Nilsson Co-authored-by: John Wellbelove commit 4cf522ed46a500d81c24969410bb06353ece9128 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Tue Sep 23 11:26:19 2025 -0400 etl array checks (#1188) * Regression fix: Support zero arguments emplace() in etl::optional (#1183) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Support zero arguments emplace() in etl::optional For non-fundamental types, a recent change in etl::optional was introduced that doesn't support zero arguments emplace() anymore. This change fixes it and adds the respective test. --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife * Fix etl::typed_storage by supporting omitted destructors (#1182) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Fix etl::typed_storage by supporting omitted destructors In a recent change to alignment.h, the etl::typed_storage was changed in a way that in case of an already constructed object, the object is created via assignment. However, this contradicts the original use case that led to etl::typed_storage in the first place: https://github.com/ETLCPP/etl/pull/1023 The goal is to omit destructors (and at the same time support classes with deleted assignment operators), so they can be optimized out at link time. This change reverts commit ac7b268 to restore the original functionality and changes the test to reflect the original use case. * Fix missing create() in non-C++11 typed_storage_ext constructor * Typo fix --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove * removed navis file from project * Updated version and release notes * Removed forced unsigned int cast in type_def bit-shift operators (#1178) * Removed UB in type_def bit-shift operators * Changed shift operators to allow both signed and unsigned operands for shifts This allows the library user to explicitly use unsigned values to avoid UB * Fixed constexpr errors for CPP11 * Changed is_arithmetic checks to use is_integral since valid shifts require integral operands * Removed need for CPP11 since changes are CPP03 compatible * Delete project navis files * Add force CI check on piull requests * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Re architect the extra checks * Add CHECK_EXTRA * Fix newline at end of file * The check index macro also needs to be defined to throw * Remove ETL_VERBOSE_ERRORS macros --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove Co-authored-by: David Ockey <2897027+ockeydockey@users.noreply.github.com> Co-authored-by: Marco Nilsson commit 69c3f74b0f7668ae8c8fd1afd96e21a9e1b54891 Author: John Wellbelove Date: Mon Sep 22 10:41:50 2025 +0100 Modified to use new ETL_ASSERTs commit 5ac8070a8cd97464d4ea16ecaf42e1800eb8f104 Author: John Wellbelove Date: Wed Sep 10 14:34:57 2025 +0100 Added more ETL_NOEXCEPT to etl::array commit 972aedd9448db177f4b7e2dd9e5fc2d17d2f9c60 Author: John Wellbelove Date: Wed Sep 10 14:34:06 2025 +0100 Removed #define ETL_DEBUG as this is a project define commit fbb92f85fc62fef9e45caa7fb5eefeaa1177534e Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Wed Sep 10 05:52:22 2025 -0400 Debug assert (#1175) * debug assert POC * Swith to ETL_CONSTEXPR14 * Finish TODO checks * First and last can be equal * Add ETL_DEBUG_THROW_EXCEPTIONS * Try allowing c++11 constexpr * Add macro for throwing from c++11 constexpr * Remove braces * Add extra asserts in size_t overload functions * Fill out debug asserts * Line up comments commit 5face0d8f2830deb95e7cd5e6abd19bbb92d68d4 Author: John Wellbelove Date: Sat Sep 6 10:19:31 2025 +0100 Updated version and release notes # Conflicts: # support/Release notes.txt commit 1b5ff74a3d796c4199062dd13bdf9aa4039f23fe Author: John Wellbelove Date: Thu Sep 18 09:07:34 2025 +0100 Fixed spelling of gdc to gcd commit 081b693e0bdc27c24a051729a208dce94bcfaaba Merge: 1da478fa 3295cb30 Author: John Wellbelove Date: Thu Sep 25 09:26:33 2025 +0100 Merge branch 'pull-request/#1188-etl-array-checks' into development commit 3295cb30cab38a9cfd6ca41573ab348bd904b354 Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Tue Sep 23 11:26:19 2025 -0400 etl array checks (#1188) * Regression fix: Support zero arguments emplace() in etl::optional (#1183) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Support zero arguments emplace() in etl::optional For non-fundamental types, a recent change in etl::optional was introduced that doesn't support zero arguments emplace() anymore. This change fixes it and adds the respective test. --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife * Fix etl::typed_storage by supporting omitted destructors (#1182) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Fix etl::typed_storage by supporting omitted destructors In a recent change to alignment.h, the etl::typed_storage was changed in a way that in case of an already constructed object, the object is created via assignment. However, this contradicts the original use case that led to etl::typed_storage in the first place: https://github.com/ETLCPP/etl/pull/1023 The goal is to omit destructors (and at the same time support classes with deleted assignment operators), so they can be optimized out at link time. This change reverts commit ac7b268 to restore the original functionality and changes the test to reflect the original use case. * Fix missing create() in non-C++11 typed_storage_ext constructor * Typo fix --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove * removed navis file from project * Updated version and release notes * Removed forced unsigned int cast in type_def bit-shift operators (#1178) * Removed UB in type_def bit-shift operators * Changed shift operators to allow both signed and unsigned operands for shifts This allows the library user to explicitly use unsigned values to avoid UB * Fixed constexpr errors for CPP11 * Changed is_arithmetic checks to use is_integral since valid shifts require integral operands * Removed need for CPP11 since changes are CPP03 compatible * Delete project navis files * Add force CI check on piull requests * Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() * Updated version and release notes * Updated version and release notes * Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. * Updated version and release notes * Re architect the extra checks * Add CHECK_EXTRA * Fix newline at end of file * The check index macro also needs to be defined to throw * Remove ETL_VERBOSE_ERRORS macros --------- Co-authored-by: Roland Reichwein Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove Co-authored-by: David Ockey <2897027+ockeydockey@users.noreply.github.com> Co-authored-by: Marco Nilsson commit e88a74362bf2eb206b6741c857b72804e2b57f98 Author: John Wellbelove Date: Mon Sep 22 10:41:50 2025 +0100 Modified to use new ETL_ASSERTs commit cc62f212ab1e83e9d399dc88e806db53d0a225f7 Author: John Wellbelove Date: Sun Sep 21 10:06:12 2025 +0100 Rebased on development commit 62b5a4a6aef905e2fd2d7bc51d23ca087f4d144b Author: John Wellbelove Date: Sat Sep 20 11:25:09 2025 +0100 Rebased on development commit 1da478fa603e1330b347ad0dfade2eaa06f56943 Merge: bc78ebb7 97cd7e90 Author: John Wellbelove Date: Thu Sep 18 09:09:53 2025 +0100 Merge branch 'hotfix/#1181-Compilation-errors-on-basic_string' into development # Conflicts: # include/etl/optional.h # support/Release notes.txt commit bc78ebb72e459328ab67cb28de880fe0609b9769 Author: John Wellbelove Date: Thu Sep 18 09:07:34 2025 +0100 Fixed spelling of gdc to gcd commit 16060ee0ae6e8e144b53a787c144fef55e4a34b1 Author: Roland Reichwein Date: Wed Sep 17 21:16:57 2025 +0200 Guards around usage of std::initializer_list in optional.h (#1186) * Guards around usage of std::initializer_list in optional.h In optional.h, ETL_HAS_INITIALIZER_LIST is being used to guard against cases where std::initializer_list is not available. But not consistently. This changes fixes it by adding it in the remaining places. * Fixed #undef in optional.h Instead of undefining ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP14, ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP20_STL was undefined twice (one of the misspelled). * Fix comment typos commit 191d4fb0f040a79728ba35bebafde8579513bc2c Author: Roland Reichwein Date: Wed Sep 17 21:16:57 2025 +0200 Guards around usage of std::initializer_list in optional.h (#1186) * Guards around usage of std::initializer_list in optional.h In optional.h, ETL_HAS_INITIALIZER_LIST is being used to guard against cases where std::initializer_list is not available. But not consistently. This changes fixes it by adding it in the remaining places. * Fixed #undef in optional.h Instead of undefining ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP14, ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP20_STL was undefined twice (one of the misspelled). * Fix comment typos commit cabfa28401c82750ae13a2aa7f2277c552a9a928 Author: John Wellbelove Date: Sat Sep 13 08:28:22 2025 +0100 Updated version and release notes commit 9f7e4abd420823e045be3b3a0018d46b4b6624bf Author: Marco Nilsson Date: Sat Sep 13 09:23:15 2025 +0200 Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. commit f5bdca7216cac54ee8d06cd04e90c259c0a5ed83 Author: John Wellbelove Date: Fri Sep 12 20:38:41 2025 +0100 Updated version and release notes commit 8ed8a47c555a5a41ea8e4febdc13806c75c410f3 Author: John Wellbelove Date: Fri Sep 12 20:20:19 2025 +0100 Updated version and release notes commit 88e2aaeec0e3f88acaf074ac862fd40c0f5922e3 Author: John Wellbelove Date: Fri Sep 12 20:19:27 2025 +0100 Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() commit a21b96396e6a7d423830394083d986cb85e1af5a Author: Roland Reichwein Date: Wed Sep 17 21:16:57 2025 +0200 Guards around usage of std::initializer_list in optional.h (#1186) * Guards around usage of std::initializer_list in optional.h In optional.h, ETL_HAS_INITIALIZER_LIST is being used to guard against cases where std::initializer_list is not available. But not consistently. This changes fixes it by adding it in the remaining places. * Fixed #undef in optional.h Instead of undefining ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP14, ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP20_STL was undefined twice (one of the misspelled). * Fix comment typos commit e4117e9eb487fbd5d22e011f1d2539547952be9f Author: John Wellbelove Date: Sat Sep 13 08:28:22 2025 +0100 Updated version and release notes commit c80939759c2499757c7daf70b8b6dedc0cba50fa Author: Marco Nilsson Date: Sat Sep 13 09:23:15 2025 +0200 Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. commit df6d3b8f023df257e9b685b82262c957a0c05a4b Author: John Wellbelove Date: Fri Sep 12 20:38:41 2025 +0100 Updated version and release notes commit 5177f69994255e84bc310362f338eb88c386ef50 Author: John Wellbelove Date: Fri Sep 12 20:20:19 2025 +0100 Updated version and release notes commit 7a2c918b1e8704db869356d9484d9123b877ad8f Author: John Wellbelove Date: Fri Sep 12 20:19:27 2025 +0100 Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() commit 294720937fbd0d6a387d197a2a19f26ada84b8d5 Author: John Wellbelove Date: Wed Sep 17 20:44:52 2025 +0100 Added and fixed noexcept attributes Added ETL_NOEXCEPT_FROM to set noexcept attributes based on an object or function. commit 9028cf09b3e0817265aa9e4dc0153417c522d59a Author: Roland Reichwein Date: Wed Sep 17 21:16:57 2025 +0200 Guards around usage of std::initializer_list in optional.h (#1186) * Guards around usage of std::initializer_list in optional.h In optional.h, ETL_HAS_INITIALIZER_LIST is being used to guard against cases where std::initializer_list is not available. But not consistently. This changes fixes it by adding it in the remaining places. * Fixed #undef in optional.h Instead of undefining ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP14, ETL_OPTIONAL_ENABLE_CONSTEXPR_BOOL_RETURN_CPP20_STL was undefined twice (one of the misspelled). * Fix comment typos commit f9cf20d79a7b6bc7d63f3c9626b584b1ff9ab46e Author: John Wellbelove Date: Sat Sep 13 08:28:22 2025 +0100 Updated version and release notes commit 18caa159ac8babd5f7ea56b7c21d89a8a87c57e6 Author: Marco Nilsson Date: Sat Sep 13 09:23:15 2025 +0200 Remove noexcept from delegate method stubs. (#1185) In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate. commit c2e7e8aca9f894bdca323a5cfbf078c702385902 Author: John Wellbelove Date: Fri Sep 12 20:38:41 2025 +0100 Updated version and release notes commit 54ba9a8aeaf22d195965c8786495460d1587e137 Author: John Wellbelove Date: Fri Sep 12 20:20:19 2025 +0100 Updated version and release notes commit 5c91f8b573c581be559f5d27899112c483ce086b Author: John Wellbelove Date: Fri Sep 12 20:19:27 2025 +0100 Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or() Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or() commit 9a9a96f5c5353f02dad74b2dd11566d14a879946 Author: John Wellbelove Date: Fri Sep 12 12:48:18 2025 +0100 Moved and renamed common class to base commit fd7edc937d6319aa0af5af86f43d8bc77e0a67e2 Author: John Wellbelove Date: Fri Sep 12 12:47:51 2025 +0100 Added insert/remove tests commit 416544828262f735bac35e43bcb865ea6f39fa90 Author: John Wellbelove Date: Fri Sep 12 12:47:18 2025 +0100 Changed timer to match the internal layout of other timers commit 95ff22821c291ae9570359881a451efacc651a93 Author: John Wellbelove Date: Wed Sep 10 14:34:57 2025 +0100 Added more ETL_NOEXCEPT to etl::array commit 5dfdea711589ffac88bfd2e512f083da7cfb6870 Author: John Wellbelove Date: Wed Sep 10 14:34:06 2025 +0100 Removed #define ETL_DEBUG as this is a project define commit 59ec7855c1319020c22ecc1e3dd45f73e8e29a88 Author: John Wellbelove Date: Thu Sep 11 18:21:54 2025 +0100 Add force CI check on piull requests commit bc027139e27f1d891e0242f3578405e6955a86e0 Author: John Wellbelove Date: Thu Sep 11 18:21:10 2025 +0100 Delete project navis files commit 042a62154e75414f4d8b5e10bfc5bb3b6fb3459c Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Thu Sep 11 10:23:50 2025 -0500 Removed forced unsigned int cast in type_def bit-shift operators (#1178) * Removed UB in type_def bit-shift operators * Changed shift operators to allow both signed and unsigned operands for shifts This allows the library user to explicitly use unsigned values to avoid UB * Fixed constexpr errors for CPP11 * Changed is_arithmetic checks to use is_integral since valid shifts require integral operands * Removed need for CPP11 since changes are CPP03 compatible commit b5e065e1c8a5a232109353fe9a3df56800213abb Author: John Wellbelove Date: Wed Sep 10 20:52:16 2025 +0100 Updated version and release notes commit 193b6ba3e8c3dabdba7bef9b95b4b135d8243e50 Author: Roland Reichwein Date: Wed Sep 10 11:41:09 2025 +0200 Fix etl::typed_storage by supporting omitted destructors (#1182) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Fix etl::typed_storage by supporting omitted destructors In a recent change to alignment.h, the etl::typed_storage was changed in a way that in case of an already constructed object, the object is created via assignment. However, this contradicts the original use case that led to etl::typed_storage in the first place: https://github.com/ETLCPP/etl/pull/1023 The goal is to omit destructors (and at the same time support classes with deleted assignment operators), so they can be optimized out at link time. This change reverts commit ac7b268 to restore the original functionality and changes the test to reflect the original use case. * Fix missing create() in non-C++11 typed_storage_ext constructor * Typo fix --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove commit ea91dabee5aa0186cedf62c2cfae62b9f9d29008 Author: Roland Reichwein Date: Wed Sep 10 11:37:30 2025 +0200 Regression fix: Support zero arguments emplace() in etl::optional (#1183) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Support zero arguments emplace() in etl::optional For non-fundamental types, a recent change in etl::optional was introduced that doesn't support zero arguments emplace() anymore. This change fixes it and adds the respective test. --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife commit df30de28773246760f75c73b2baee3372fea9fe2 Author: John Wellbelove Date: Wed Sep 10 10:50:02 2025 +0100 removed navis file from project commit 91aa52988b51dc4e410baba5bf922073704040c5 Author: John Wellbelove Date: Thu Sep 11 19:28:03 2025 +0100 Added insert and remove timer callback tests to test_message_timer_interrupt and test_message_timer_locked commit 14c9e9d48e4d8e67f93dc9108e354853253d9e74 Merge: 73cf38cc 5f70befa Author: John Wellbelove Date: Thu Sep 11 18:39:12 2025 +0100 Merge branch 'pull-request/#1155-Added-callbacks-when-a-timer-is-inserted-or-removed' of https://github.com/ETLCPP/etl into pull-request/#1155-Added-callbacks-when-a-timer-is-inserted-or-removed commit 5f70befa4aaf68494a24a1d37e6a04f06b8dfd11 Author: Mario Luzeiro Date: Thu Sep 11 18:38:48 2025 +0100 Added callbacks when a timer is inserted or removed (#1155) commit 73cf38cc570523d16a160d6ad28cae9374a17414 Merge: 96201f79 f801b9a0 Author: John Wellbelove Date: Thu Sep 11 18:27:54 2025 +0100 Merge branch 'pull-request/#1155-Added-callbacks-when-a-timer-is-inserted-or-removed' of https://github.com/ETLCPP/etl into pull-request/#1155-Added-callbacks-when-a-timer-is-inserted-or-removed # Conflicts: # test/vs2022/etl.vcxproj.filters commit 96201f791910955e276a566225a89eba2f2a3303 Author: John Wellbelove Date: Thu Sep 11 18:21:54 2025 +0100 Add force CI check on piull requests commit 96f494aeae305b50b969495470cb469313e8a019 Author: John Wellbelove Date: Thu Sep 11 18:21:10 2025 +0100 Delete project navis files commit 603c97773331ac0249dd111897db2782d048c436 Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Thu Sep 11 10:23:50 2025 -0500 Removed forced unsigned int cast in type_def bit-shift operators (#1178) * Removed UB in type_def bit-shift operators * Changed shift operators to allow both signed and unsigned operands for shifts This allows the library user to explicitly use unsigned values to avoid UB * Fixed constexpr errors for CPP11 * Changed is_arithmetic checks to use is_integral since valid shifts require integral operands * Removed need for CPP11 since changes are CPP03 compatible commit db57df1e4159c332b40cc4139e58112304345f15 Merge: 73243883 476c965a Author: John Wellbelove Date: Wed Sep 10 20:54:48 2025 +0100 Merge branch 'development' # Conflicts: # include/etl/alignment.h commit 476c965a1f68a75c2185e0cb527b11b8cac4e280 Author: John Wellbelove Date: Wed Sep 10 20:52:16 2025 +0100 Updated version and release notes commit 999c210d285a60850c6882eb95372f902e9a294e Author: mike919192 <91038685+mike919192@users.noreply.github.com> Date: Wed Sep 10 05:52:22 2025 -0400 Debug assert (#1175) * debug assert POC * Swith to ETL_CONSTEXPR14 * Finish TODO checks * First and last can be equal * Add ETL_DEBUG_THROW_EXCEPTIONS * Try allowing c++11 constexpr * Add macro for throwing from c++11 constexpr * Remove braces * Add extra asserts in size_t overload functions * Fill out debug asserts * Line up comments commit 5add8a94a7b8471acf167b1f3e56551fb18c9bce Merge: 02853e5b d6d78eb8 Author: John Wellbelove Date: Wed Sep 10 10:50:09 2025 +0100 Merge branch 'development' of https://github.com/ETLCPP/etl into development commit 02853e5bb623caf78c2a525a8ecad27bcc549927 Author: John Wellbelove Date: Wed Sep 10 10:50:02 2025 +0100 removed navis file from project commit d6d78eb8bdfa4e99b79ed24094f7746514ae1020 Author: Roland Reichwein Date: Wed Sep 10 11:41:09 2025 +0200 Fix etl::typed_storage by supporting omitted destructors (#1182) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Fix etl::typed_storage by supporting omitted destructors In a recent change to alignment.h, the etl::typed_storage was changed in a way that in case of an already constructed object, the object is created via assignment. However, this contradicts the original use case that led to etl::typed_storage in the first place: https://github.com/ETLCPP/etl/pull/1023 The goal is to omit destructors (and at the same time support classes with deleted assignment operators), so they can be optimized out at link time. This change reverts commit ac7b268 to restore the original functionality and changes the test to reflect the original use case. * Fix missing create() in non-C++11 typed_storage_ext constructor * Typo fix --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife Co-authored-by: John Wellbelove commit 75606fc079c4785c8726bfe1c1364ff159a322a2 Author: Roland Reichwein Date: Wed Sep 10 11:37:30 2025 +0200 Regression fix: Support zero arguments emplace() in etl::optional (#1183) * Added coderabbitai configuration * Added builtin mem function tests * Modified etl::typed_storage * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW * Added etl::typed_storage_ext and swap for same * Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h * Added release notes * Fixes to GCC -O2 errors * Changed char* parameters to value_type* parameters * Fixed compilation issues for const containers unit tests * Added automatic selection of __builtin_memxxx functions for GCC and clang * Added enhanced coderabbit configuration * Updated version and release notes * Disabled constexpr const container tests for C++11 * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Attempted fixes for MacOS compilation * Updated version and release notes * feat: removed unreachable break statements (#1169) * Updated version and release notes * Modified etl::typed_storage # Conflicts: # include/etl/alignment.h * Support zero arguments emplace() in etl::optional For non-fundamental types, a recent change in etl::optional was introduced that doesn't support zero arguments emplace() anymore. This change fixes it and adds the respective test. --------- Co-authored-by: John Wellbelove Co-authored-by: Drew Rife commit 73243883ce4887e855e3d48030e5347570a75a18 Merge: ac7b268c 8c292381 Author: John Wellbelove Date: Sun Sep 7 09:36:47 2025 +0100 Merge branch 'master' of https://github.com/ETLCPP/etl # Conflicts: # .coderabbit.yaml # include/etl/alignment.h # support/Release notes.txt commit ac7b268c32a758bfbc92a9368d91957fb1f6bfd1 Author: John Wellbelove Date: Tue Aug 26 16:43:33 2025 +0100 Modified etl::typed_storage # Conflicts: # include/etl/alignment.h commit 7301617708951cfd1a7a08f0f36f10dfc424368f Author: John Wellbelove Date: Sun Sep 7 09:26:54 2025 +0100 Updated version and release notes commit 0d0e290474d9e8e89f79e8c10254d0b55213f68f Author: John Wellbelove Date: Sat Sep 6 20:49:39 2025 +0100 Changed #if ETL_USING_STL to #if ETL_USING_STD_OSTREAM around std::basic_ostream Fixed warnings when using ETL_DEBUG_COUNT in non debug build commit 2fa82d579e0c5f717c99dc2ac58467808c09aeb2 Author: John Wellbelove Date: Sat Sep 6 16:25:20 2025 +0100 Macro changes to fix issues commit d27adeb510d8c18a4a1f053f19e71d774276b441 Author: John Wellbelove Date: Sat Sep 6 11:23:20 2025 +0100 #1171 optional of a const arary can't be emplaced with gcc-15 commit ea61ff7770240cb3230edb13318251659d8c1342 Author: John Wellbelove Date: Sat Sep 6 10:19:31 2025 +0100 Updated version and release notes commit 0326edef428491a190ca82d33985984791095274 Author: John Wellbelove Date: Sat Sep 6 09:46:03 2025 +0100 Replaced ETL_NOEXCEPT_IF_NO_THROW with ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS) commit 363d2e8ab557fe7ec98410f2547f53f56f1b03e4 Author: Roland Reichwein Date: Sat Sep 6 21:50:58 2025 +0200 Make call interfaces in etl::delegate and etl::closure conditionally noexcept (#1172) * Make all call interfaces in etl::delegate conditionally noexcept This covers the case when the invoked code can throw. For operator(), this was already implemented. Do similarly for the other call interfaces. * Make all call interfaces in etl::closure conditionally noexcept Similar to etl::delegate, the contained delegate might be throwing. Apply the same solution as in etl::delegate to make the call interfaces conditionally noexcept. commit 97cd7e90dccf5b47375d7de6434c8fd7d69fbc39 Author: John Wellbelove Date: Sat Sep 6 20:49:39 2025 +0100 Changed #if ETL_USING_STL to #if ETL_USING_STD_OSTREAM around std::basic_ostream Fixed warnings when using ETL_DEBUG_COUNT in non debug build commit 1b65c4ec9135e6e708b33de7761639a9ecc2bb74 Author: John Wellbelove Date: Sat Sep 6 16:25:20 2025 +0100 Macro changes to fix issues commit 92f07a66fcb2f5e5f9d7d85da5c29c5c73cf491f Author: Roland Reichwein Date: Sat Sep 6 15:12:34 2025 +0200 Fix .clang-format (#1177) * Added coderabbitai configuration * Fix .clang-format --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit 0536abe826893a0cd95a1b64573ffe790e9dd1d7 Author: John Wellbelove Date: Sat Sep 6 11:23:20 2025 +0100 #1171 optional of a const arary can't be emplaced with gcc-15 commit 228d789a6c47bf2e8e40c06723ee09645c14fabd Author: John Wellbelove Date: Sat Sep 6 10:19:31 2025 +0100 Updated version and release notes commit ce1c0e504bf01ebdc678d435bb1384bd8452e46d Author: John Wellbelove Date: Sat Sep 6 09:46:03 2025 +0100 Replaced ETL_NOEXCEPT_IF_NO_THROW with ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS) commit b85b071a3eb6484272ef15d33ec88e0c9f3a534d Author: David Ockey <2897027+ockeydockey@users.noreply.github.com> Date: Sat Sep 6 03:32:03 2025 -0500 Made all 'noexcept' statements use ETL_NOEXCEPT macro (#1179) * Added coderabbitai configuration * Made all 'noexcept' statements use ETL_NOEXCEPT macro --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove commit 8c29238116a8d5fdc00e82269a0830d00bad88f7 Author: John Wellbelove Date: Thu Sep 4 19:45:12 2025 +0100 Updated version and release notes commit 4bdb55cfe6488361b839481c9812cd6e7eb198ec Author: Drew Rife Date: Thu Sep 4 14:32:57 2025 -0400 feat: removed unreachable break statements (#1169) commit 8dc10b7a37ef8646e46934abbeaee4333a24b9ce Author: John Wellbelove Date: Thu Sep 4 18:07:00 2025 +0100 Updated version and release notes commit c2143f5d6cf597a33eb4e927d31a27f4f34f034e Author: John Wellbelove Date: Thu Sep 4 15:00:22 2025 +0100 Attempted fixes for MacOS compilation commit 99432a8e710cc339abd77c97fa51ea8909083757 Author: John Wellbelove Date: Thu Sep 4 14:35:16 2025 +0100 Attempted fixes for MacOS compilation commit 1216ab2247f3aab793748722d8e723154f737c7f Author: John Wellbelove Date: Thu Sep 4 14:26:01 2025 +0100 Attempted fixes for MacOS compilation commit dffb6110364d8d6fc78ee9eaaac09669a8170366 Author: John Wellbelove Date: Thu Sep 4 13:51:32 2025 +0100 Attempted fixes for MacOS compilation commit 57e52ba217c4730cdcf4d3974e4764205c1e7433 Author: John Wellbelove Date: Thu Sep 4 12:52:35 2025 +0100 Disabled constexpr const container tests for C++11 commit 90f933ff69b9dedccb5ed33098b02b56393f259f Author: John Wellbelove Date: Thu Sep 4 11:29:02 2025 +0100 Updated version and release notes commit 475e6dd878046172097ad43dbb0332fb9ca4d9c3 Author: John Wellbelove Date: Thu Sep 4 11:27:27 2025 +0100 Added enhanced coderabbit configuration commit eea7fe227d679792e978ebc6ac819811f9383931 Author: John Wellbelove Date: Thu Sep 4 10:11:57 2025 +0100 Added automatic selection of __builtin_memxxx functions for GCC and clang commit f835daec50ad452ecb3e00566b942ec1be8ab293 Author: John Wellbelove Date: Thu Sep 4 10:10:52 2025 +0100 Fixed compilation issues for const containers unit tests commit ebd2edde8fad24b6a4b668e6369269387a427292 Author: John Wellbelove Date: Thu Sep 4 10:10:02 2025 +0100 Changed char* parameters to value_type* parameters commit 0676f8345fcfaf44f63dd25beb69831618c4a9de Author: John Wellbelove Date: Tue Sep 2 13:51:45 2025 +0100 Fixes to GCC -O2 errors commit 9db992256f63ffa049f14405bf5608f1711c7227 Author: John Wellbelove Date: Thu Aug 28 14:09:17 2025 +0100 Added release notes commit ece4b711f58c1235acdfb8f40a1b9e0392deea67 Author: John Wellbelove Date: Thu Aug 28 10:30:24 2025 +0100 Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h commit 33302790baf0a4546e943d10c875c48dceaaa69c Author: John Wellbelove Date: Thu Aug 28 10:30:24 2025 +0100 Added etl::typed_storage_ext and swap for same commit aea6e7da8bd2a5cf01e5719e083b7ebb1a3bc894 Author: John Wellbelove Date: Tue Aug 26 17:41:51 2025 +0100 Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW commit dffbd1e1ef4a41287054cfbbf15156da9a51e842 Author: John Wellbelove Date: Tue Aug 26 16:43:33 2025 +0100 Modified etl::typed_storage # Conflicts: # include/etl/alignment.h commit c52b6d067330ffdbf1c2eb9eb734c21f4e684e2c Author: John Wellbelove Date: Tue Aug 26 16:43:33 2025 +0100 Modified etl::typed_storage commit e2a07c98bfeab99c006d02f20f7d588b3fed4aec Author: John Wellbelove Date: Fri Aug 22 19:20:15 2025 +0100 Added builtin mem function tests commit e760e62dcdce3ab5a390a6577519a7b7b3026f52 Author: John Wellbelove Date: Thu Sep 4 19:45:12 2025 +0100 Updated version and release notes commit 515dcf4bf6415d56fad77383c00238789957fe96 Author: Drew Rife Date: Thu Sep 4 14:32:57 2025 -0400 feat: removed unreachable break statements (#1169) commit efdfee83338afd161d636881894b6d70b416c479 Author: John Wellbelove Date: Thu Sep 4 18:07:00 2025 +0100 Updated version and release notes commit bb628aa25d7c0d6205bbabe62c6f43b52be3af97 Author: John Wellbelove Date: Thu Sep 4 15:00:22 2025 +0100 Attempted fixes for MacOS compilation commit b5ea03133d1d3fb13fd400076ed1eeb249954b10 Author: John Wellbelove Date: Thu Sep 4 14:35:16 2025 +0100 Attempted fixes for MacOS compilation commit 73ae8f4d85327b94725217756fd2562c6fae00c1 Author: John Wellbelove Date: Thu Sep 4 14:26:01 2025 +0100 Attempted fixes for MacOS compilation commit 2d1af2dfb640fd7f70038dbaf5da17c83e242c17 Author: John Wellbelove Date: Thu Sep 4 13:51:32 2025 +0100 Attempted fixes for MacOS compilation commit 0deb8556765c4681cb328ba1a4e1c2193a09bbdb Author: John Wellbelove Date: Thu Sep 4 12:52:35 2025 +0100 Disabled constexpr const container tests for C++11 commit 958c331d4998b70f88a12011aa6b4ae43f9dbdae Author: John Wellbelove Date: Thu Sep 4 11:29:02 2025 +0100 Updated version and release notes commit 76d0a7846337d983acdcbae86dc5feba7ef30669 Author: John Wellbelove Date: Thu Sep 4 11:27:27 2025 +0100 Added enhanced coderabbit configuration commit 51675a6ce7f3778235a86faa885d80d2269baf84 Author: John Wellbelove Date: Thu Sep 4 10:11:57 2025 +0100 Added automatic selection of __builtin_memxxx functions for GCC and clang commit 119d381570a606c00c8814e57baadb0bda04fbb6 Author: John Wellbelove Date: Thu Sep 4 10:10:52 2025 +0100 Fixed compilation issues for const containers unit tests commit d92eb4d3ff73cca77ef9fa5eebb33de5401dfe15 Author: John Wellbelove Date: Thu Sep 4 10:10:02 2025 +0100 Changed char* parameters to value_type* parameters commit 3837e36d71c6fb259ff8e4e38e3b871a51a0487b Author: John Wellbelove Date: Tue Sep 2 13:51:45 2025 +0100 Fixes to GCC -O2 errors commit c93440dadb4e78fd9a825eadb398fc11e1e0e0f9 Author: John Wellbelove Date: Sat Aug 30 18:29:52 2025 +0100 Added coderabbitai configuration commit 18f50d01c4a37cdc1904521252c64b7e79677d49 Author: John Wellbelove Date: Thu Aug 28 14:09:17 2025 +0100 Added release notes commit 89c479ef15ab9d02cdf4f70add4192b9e4a94cf5 Author: John Wellbelove Date: Thu Aug 28 10:30:24 2025 +0100 Added etl::typed_storage_ext and swap for same # Conflicts: # include/etl/alignment.h commit 18a7e79c562e6d16527089298ceb7c9e195a68bc Author: John Wellbelove Date: Thu Aug 28 10:30:24 2025 +0100 Added etl::typed_storage_ext and swap for same commit 7c2804c1a9cad958c3abc649c7bfd1efd9b3b140 Author: John Wellbelove Date: Tue Aug 26 17:41:51 2025 +0100 Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW commit bfe4f62574fa33cd3e9c7bc723df29109dc12764 Merge: 0081cfa7 0ca68938 Author: John Wellbelove Date: Tue Aug 26 17:39:08 2025 +0100 Merge branch 'feature/#1170-Place-a-typed-pointer-instead-of-a-bool-into-`etl--typed_storage' of https://github.com/ETLCPP/etl into feature/#1170-Place-a-typed-pointer-instead-of-a-bool-into-`etl--typed_storage # Conflicts: # include/etl/alignment.h commit 0081cfa7947ba2d4649d8d3b74442a36d100be9a Author: John Wellbelove Date: Tue Aug 26 16:43:33 2025 +0100 Modified etl::typed_storage commit 0ca68938ff831054ab7dd951c894aea0c080c44a Author: John Wellbelove Date: Tue Aug 26 16:43:33 2025 +0100 Modified etl::typed_storage commit 5f8b7f7120691e2b8944b30f909f61440d0fb4d2 Author: John Wellbelove Date: Fri Aug 22 19:20:15 2025 +0100 Added builtin mem function tests commit f801b9a0933ad77e634f9e0a2b10246d286fc442 Author: John Wellbelove Date: Wed Aug 20 09:25:50 2025 +0100 Fix VS2022 filters commit e3dac1e33e019dd3e1f502f4e254dab34d56e3c7 Merge: f67ae46b cde5bcff Author: John Wellbelove Date: Tue Aug 19 19:13:31 2025 +0100 Merge branch 'development' commit cde5bcff69fa471093b4d868a379e35a7a69e6d1 Author: John Wellbelove Date: Tue Aug 19 18:50:57 2025 +0100 Updated release notes and version commit 2a970134dad98240ea83cf37d6ef32404c64c274 Author: John Wellbelove Date: Tue Aug 19 16:01:46 2025 +0100 Removed releaser and destroyer in favour of lambdas and similar commit 6b7bfb8633ffad2f62ea8e752cfb08a9950f9e3b Merge: 4d5cb98d fb6c42ec Author: John Wellbelove Date: Tue Aug 19 13:18:34 2025 +0100 Merge branch 'development' of https://github.com/ETLCPP/etl into development commit 4d5cb98d29a54c5e2b523cd6d470a606a69c946c Author: John Wellbelove Date: Mon Aug 18 19:45:40 2025 +0100 Fixed ETL_NOEXCEPT_IF_NO_THROW and #define ETL_NOEXCEPT_IF_NO_THROW_EXPR(...) for C++03 Updated example Added releaser and destroyer functors to etl::ipool to simplify integration with etl::unique_ptr commit fb6c42ec789464c26a4c813e867785bf2912f600 Author: John Wellbelove Date: Mon Aug 18 19:45:40 2025 +0100 Fixed ETL_NOEXCEPT_IF_NO_THROW and #define ETL_NOEXCEPT_IF_NO_THROW_EXPR(...) for C++03 commit 5f37af3f83e07bf4ada30df31ca385b5af00fabc Author: John Wellbelove Date: Mon Aug 18 19:44:51 2025 +0100 Changed release() to destroy() to match create() commit 44ec1e4f25110e5144df2106f82dd4827df0d3c4 Author: John Wellbelove Date: Mon Aug 18 17:34:53 2025 +0100 Updated release notes commit ac1d2c82d17f15e06961c647835b68ee7018ad6a Author: John Wellbelove Date: Mon Aug 18 17:13:07 2025 +0100 Added not_null comparison tests commit 0a5fcef33154c6d328b50068be1f0c3524f9338c Merge: 3a25d593 037029ea Author: John Wellbelove Date: Mon Aug 18 16:52:00 2025 +0100 Merge branch 'feature/#1166-Feature-Request--implement-not_null' of https://github.com/ETLCPP/etl into feature/#1166-Feature-Request--implement-not_null commit 3a25d5934ab52c63918f27edbf6d73659cb82427 Author: John Wellbelove Date: Sun Aug 17 10:37:27 2025 +0100 Added constexpr. Removed some member functions. Removed 'move' member functions for etl::not_null> commit 3bc87f1045ed09f818c1a5ad52705adfbc56ab62 Author: John Wellbelove Date: Sat Aug 16 10:12:41 2025 +0100 Changed unique() to underlying_type() Added underlying_type() to etl::not_null commit 2d22dfe23681c79f913e832f3d16fc366b4a4a04 Author: John Wellbelove Date: Sat Aug 16 10:12:41 2025 +0100 Changed unique() to underlying_type() Added underlying_type() to etl::not_null commit 877ef005eafd49af38c032db8274858cd97496a3 Author: John Wellbelove Date: Fri Aug 15 18:04:50 2025 +0100 Fixed file Id error Updated CMakeLists.txt for tests and syntax checks commit 28d90aa80c7414a6cc9b92f0e1bbae0a6d781b5d Author: John Wellbelove Date: Fri Aug 15 17:18:15 2025 +0100 Initial implementation commit f6fd44a096cab108a38be7cc385150fe99861253 Author: John Wellbelove Date: Fri Aug 15 10:27:35 2025 +0100 Initial implementation commit 63d74706850f056d63d5b19465c4cee8d6eab3a7 Author: John Wellbelove Date: Mon Aug 18 14:22:33 2025 +0100 Added etl::nontype_t, with C++11 and C++17 alternatives commit 450948933f32d657c5330dc0638355959b77c7dc Author: John Wellbelove Date: Mon Aug 18 14:20:45 2025 +0100 Added example of the use of etl::unique_ptr with etl::pool commit 037029ea844e56d2b83d473c328dbeaa2f2106a7 Author: John Wellbelove Date: Sun Aug 17 10:37:27 2025 +0100 Added constexpr. Removed some member functions. Removed 'move' member functions for etl::not_null> commit ae8aff5ed85af9423385fcdcb79a25451ab91632 Merge: 2edde546 19635931 Author: John Wellbelove Date: Sat Aug 16 10:57:20 2025 +0100 Merge branch 'feature/#1166-Feature-Request--implement-not_null' of https://github.com/ETLCPP/etl into feature/#1166-Feature-Request--implement-not_null commit 2edde546c433caf74557aac5f5dbd6cdab3ea547 Merge: 94f7d995 d7585508 Author: John Wellbelove Date: Sat Aug 16 10:38:38 2025 +0100 Merge branch 'feature/#1166-Feature-Request--implement-not_null' of https://github.com/ETLCPP/etl into feature/#1166-Feature-Request--implement-not_null commit 1963593159f93ba4c2d24592ea56f0c7a11f9b06 Merge: 94f7d995 d7585508 Author: John Wellbelove Date: Sat Aug 16 10:38:38 2025 +0100 Merge branch 'feature/#1166-Feature-Request--implement-not_null' of https://github.com/ETLCPP/etl into feature/#1166-Feature-Request--implement-not_null commit 94f7d9956def83b65fc3c4c2c7724cbf32f6f2b3 Author: John Wellbelove Date: Sat Aug 16 10:12:41 2025 +0100 Changed unique() to underlying_type() Added underlying_type() to etl::not_null commit d7585508da860616403ec0e2b84fbcf0877b6244 Author: John Wellbelove Date: Sat Aug 16 10:12:41 2025 +0100 Changed unique() to underlying_type() Added underlying_type() to etl::not_null commit 109ba9350d8225bbb29a7926531d61316390eccc Author: John Wellbelove Date: Fri Aug 15 19:26:18 2025 +0100 Updated syntax check tests commit 08ed69bac7b6562da60609a4d3dc0a52482f4ce8 Author: John Wellbelove Date: Fri Aug 15 18:04:50 2025 +0100 Fixed file Id error Updated CMakeLists.txt for tests and syntax checks commit 20f5c0402e5fc54e9e02261036307a96a1b12e75 Author: John Wellbelove Date: Fri Aug 15 17:18:15 2025 +0100 Initial implementation commit 9c046b710c7b3ec51bbb6cb3991da0c376e77ff2 Author: John Wellbelove Date: Fri Aug 15 10:27:35 2025 +0100 Initial implementation commit f67ae46be6bb2ad3a876c7b34c30942684630f91 Merge: efae9925 2a32826b Author: John Wellbelove Date: Fri Aug 15 10:25:46 2025 +0100 Merge branch 'master' of https://github.com/ETLCPP/etl commit efae99252b6efe4f0718b95976cc15f622669bb4 Author: John Wellbelove Date: Wed Aug 13 17:51:03 2025 +0100 Fixed VS2022 project file list commit 5312f5eddd8264c27f0b237da17193ff3674dfd1 Author: John Wellbelove Date: Fri Aug 15 10:24:45 2025 +0100 Added explicit check for remainder in divide_round_to_infinity commit 2a32826b86bc1749e01bf0798f4a40b8900e0053 Merge: 3553f5db 2d470d20 Author: John Wellbelove Date: Wed Aug 13 21:07:03 2025 +0100 Merge branch 'master' of https://github.com/ETLCPP/etl commit 3553f5db227c8b4fac3b9c4879f3594c4c70f2f2 Author: John Wellbelove Date: Wed Aug 13 17:51:03 2025 +0100 Fixed VS2022 project file list commit 8c49e6770298dd3fb499da15579fcdfcd6194989 Author: John Wellbelove Date: Wed Aug 13 19:51:31 2025 +0100 Added return_type and argument_types to etl::delegate commit 2d470d20f5917d8c274029fb3139720313b3702e Author: John Wellbelove Date: Wed Aug 13 17:51:03 2025 +0100 Fixed VS2022 project file list commit 1af74206d2d1a24381cb2aec36ea37684e7794f4 Author: John Wellbelove Date: Wed Aug 13 16:10:35 2025 +0100 Updated PlatformIO action commit 534fcc6ebeb60679be5875886df65af3c4c3545e Author: John Wellbelove Date: Wed Aug 13 10:46:14 2025 +0100 Updated fsm generator commit e449a09b3eb8202bce24907cbb6ab445265f520a Author: John Wellbelove Date: Wed Aug 13 10:37:59 2025 +0100 Added automated PlatformIO update CI action commit ca5f5394f7114a2706e7170519d646bab0310e61 Author: John Wellbelove Date: Wed Aug 13 10:14:13 2025 +0100 Minor style change commit 87f121222f10716090d6bf064f648c0a68517e09 Merge: f973d31a 85b15552 Author: John Wellbelove Date: Wed Aug 13 09:32:12 2025 +0100 Merge branch 'development' of https://github.com/ETLCPP/etl into development # Conflicts: # test/test_delegate_observable.cpp commit f973d31ad105cb4f6b7d9dd533e06afbb9da20eb Merge: b734df62 4beadd18 Author: John Wellbelove Date: Wed Aug 13 08:53:26 2025 +0100 Merge branch 'development' of https://github.com/ETLCPP/etl into development # Conflicts: # test/test_delegate_observable.cpp commit 85b15552ba87ee35229a5cdacffe0895624dbee3 Merge: b734df62 4beadd18 Author: John Wellbelove Date: Wed Aug 13 08:53:26 2025 +0100 Merge branch 'development' of https://github.com/ETLCPP/etl into development # Conflicts: # test/test_delegate_observable.cpp commit b734df629bb9c5ff4b5b0bc26d430d26dd9937d2 Author: John Wellbelove Date: Wed Aug 13 08:49:23 2025 +0100 Attempt to fix Github CI GCC 11 incompatibility commit 4beadd18f434c34c8b87b7c5bb76bb0c121302af Author: John Wellbelove Date: Wed Aug 13 08:49:23 2025 +0100 Attempt to fix Github CI GCC 11 incompatibility commit 8f94ef619aa165e564a89ba18c9ecc55a2db1e0c Author: John Wellbelove Date: Tue Aug 12 21:32:51 2025 +0100 Attempt to fix Github CI GCC 11 incompatibility commit 5c24ae2f0d310021826888d0363b5e269aa18a6f Author: John Wellbelove Date: Tue Aug 12 21:21:16 2025 +0100 Attempt to fix Github CI GCC 11 incompatibility commit 3e95e772c3921b8ec56fd591c5ef5498a303aafe Author: John Wellbelove Date: Tue Aug 12 18:28:04 2025 +0100 Attempt to fix Github CI commit 310cc6e501c16ec34cddffed516ef9d42673dcd9 Author: John Wellbelove Date: Tue Aug 12 18:22:52 2025 +0100 Attempt to fix Github CI commit 86f76933c1b0f70314bfd59e0411c81bf8fad8b5 Author: John Wellbelove Date: Tue Aug 12 15:13:03 2025 +0100 Added full rounded integral division commit ddfd3fa4435a5b52f0dfe5b79da9a7d6993e305c Author: John Wellbelove Date: Mon Aug 11 20:19:18 2025 +0100 Added remaining limits tests Fixed divide_round_half_odd and added tests commit 5c52fd19cc842ed89d10447bbf015c1a42aba6ab Author: John Wellbelove Date: Mon Aug 11 09:49:37 2025 +0100 Added new unit tests Fixed integer overflow issue at limits commit ff1e4296bc939039c00c862e32900c66daed0b86 Author: John Wellbelove Date: Thu Aug 7 18:45:46 2025 +0100 Added complete set of rounded integral division commit 2de40570218b3a2a7186294b80c449814aa04858 Author: John Wellbelove Date: Tue Aug 5 18:48:15 2025 +0100 Added transition_to member function to change state Pulled out the core state change code to process_state_change commit 2ae0a422cd2cfc9dd6778774152c74baf660889e Author: John Wellbelove Date: Mon Aug 4 20:36:02 2025 +0100 Updated release notes commit 0fc2cfeff3767646745de928ed3c1167d97d411d Author: John Wellbelove Date: Mon Aug 4 17:20:05 2025 +0100 Updated fsm_generator.h to match edited fsm.h commit 5d694e7aa88359c4e118fbf3bcc5d99b1a2b3308 Author: John Wellbelove Date: Mon Aug 4 16:11:20 2025 +0100 Added ETL_UNLIKELY to ETL_ASSERT if (!(b)) conditions commit 1d4dbc89769c8dae2118a2f5f49702fa0c0ee479 Author: John Wellbelove Date: Mon Aug 4 16:10:04 2025 +0100 Added etl::fsm_state_pack and corresponding constructor commit 7504646301a91c38462016082196a1e408771b58 Author: John Wellbelove Date: Sun Aug 3 16:22:50 2025 +0100 Added delegate_observable commit 51a4d0e8da9d61ccce004dd8d7a1da478658ef23 Author: John Wellbelove Date: Sun Aug 3 16:22:10 2025 +0100 Update templates for pentential macro name conflicts commit e67066b788d7e1c3b17787c365dbf03b457a6bda Author: John Wellbelove Date: Sat Aug 2 13:47:33 2025 +0100 Added emplace type constructors to etl::optional commit 2cd28ce7c5e21631104b19b99a51cd93b4528863 Author: John Wellbelove Date: Fri Aug 1 09:23:42 2025 +0100 Fixed minor issues commit 5a2aeb683ea73cc8d71523e046d330bf60f64c47 Author: John Wellbelove Date: Sun Jul 27 12:44:58 2025 +0100 Update templates for potential macro name conflicts commit fa25b8cd5ea6b25682f8efc6c6cb8a2ed13eb348 Author: John Wellbelove Date: Sun Jul 27 11:21:06 2025 +0100 Added instructions and scripts the convert ETL header guards commit 5fc7e3322834bb94c661e1a2c4f070d0a60ebd53 Author: John Wellbelove Date: Sun Jul 27 10:39:40 2025 +0100 Added basic instructions for using guard2once and once2guard commit 43385fea634cbb4fbdb0ad57a5f2cb94538979b4 Author: John Wellbelove Date: Sun Jul 27 10:38:49 2025 +0100 Very minor layout change commit e60f68bad80fde16fab4a6b161055127c56e4d57 Author: John Wellbelove Date: Sun Jul 27 10:38:20 2025 +0100 Removed asserts from copy_s and move_s algorithms commit c26e2de7ec53bdca56f16b8ae08cb5bc3be577ef Author: John Wellbelove Date: Sun Jul 27 10:35:49 2025 +0100 Changed generate scripts to use python3 commit 833e352dcb8fad5bf455a4c6213378f129ba6446 Merge: b7de57fb b7769881 Author: John Wellbelove Date: Sat Jul 26 19:35:57 2025 +0100 Merge branch 'hotfix/#1154-etl-20.42.2-not-compiling-with-IAR-Arm-compiler-v9.20' into development commit b7de57fbf1dc6da7000e325d48847c853220ec2a Author: John Wellbelove Date: Sat Jul 26 13:26:04 2025 +0100 Update templates for pentential macro name conflicts commit 05e45117eac2b0eed3130c913a6d02b162f8fab5 Author: John Wellbelove Date: Sat Jul 26 13:23:02 2025 +0100 Update templates for pentential macro name conflicts commit b77698810fd5b218093a2fe81b9a17112899bb9c Author: John Wellbelove Date: Thu Jul 24 15:40:10 2025 +0100 hotfix #1154-etl-20.42.2-not-compiling-with-IAR-Arm-compiler-v9.20 commit 5df08645dacbaf75619df89ca421192d411b480d Author: John Wellbelove Date: Sun Jul 20 12:45:14 2025 +0100 Updated release notes commit 7858d66884f1597fc6842fff6d29d6ea8b534d56 Author: John Wellbelove Date: Sun Jul 20 11:10:48 2025 +0100 Removed redundant VS2022 project settings commit 5d7573e51382864cfabbb050b30df5ce89943c2d Author: John Wellbelove Date: Sun Jul 20 11:05:44 2025 +0100 Minor changes commit 42677dd9ee4d4d5cc03677444e2437748c93365a Merge: 5c5e5df7 0f9a8450 Author: John Wellbelove Date: Sun Jul 20 08:42:59 2025 +0100 Merge branch 'pull-request/#955-Implements-deferred-callback-timer-with-optional-priority' of https://github.com/ETLCPP/etl into pull-request/#955-Implements-deferred-callback-timer-with-optional-priority # Conflicts: # test/CMakeLists.txt commit 5c5e5df788d83c4fd8657cfbef2bc3868be15794 Author: Mario Luzeiro Date: Tue Feb 4 10:05:20 2025 +0000 Implements deferred callback timer with optional priority (#955) * Refactored callback_timer_locked to allow base class extention of tick method * Implement callback timer deferred with priority option --------- Co-authored-by: Mario Luzeiro commit f07b7e75fc0ccd323f606a2ffced2073c41b1ff3 Author: John Wellbelove Date: Sat Jul 19 16:10:08 2025 +0100 Updated release notes commit 2c904baf8027d64584fb5a4501e3662ff9af5901 Author: John Wellbelove Date: Sat Jul 19 16:10:08 2025 +0100 Updated release notes commit 0e6e9610392cb11eb410ecd9a1ea09e0e7555f14 Author: John Wellbelove Date: Sat Jul 19 15:54:06 2025 +0100 #1126 to_arithmetic does not compile on C++98 commit 7f53572b53107c492fd1437d1db7d0c1f50c7b0b Author: John Wellbelove Date: Fri Jul 18 16:33:23 2025 +0100 Fix gamma tests commit 8de211acd94b3cc49e1c1f90d53724b1abdac1f0 Author: John Wellbelove Date: Fri Jul 18 14:59:25 2025 +0100 #1151 test failure in i386 in 20.42.1: test_replace_strings in test_string_utilities.c fails commit 13fa2801a30d1449ce9a632b01ecc9608684a74b Author: John Wellbelove Date: Tue Jul 15 11:12:05 2025 +0100 Updated version and release notes commit d7875adf9ef1c5ac7ba5a96e1f941d721b0b48a4 Author: John Wellbelove Date: Tue Jul 15 10:36:43 2025 +0100 Added CRC64-ISO added commit 481e29896aa589865cc61c1fdd132e87631b3913 Merge: be5a6e29 4979c8a2 Author: John Wellbelove Date: Mon Jul 14 09:53:40 2025 +0100 Merge branch 'pull-request/#1149-Fix-bug-in-the-void-etl--unlink(first,-last)-for-bidirectional-links' into development commit 4979c8a20bfa00f002a30bdf8aa034d89bcdb1b9 Author: Sergei Date: Mon Jul 14 10:50:28 2025 +0300 Fix bug in the `void etl::unlink(first, last)` for bidirectional links. (#1149) * Reproduce bug in the `void etl::unlink(first, last)` for bidirectional links. - correct `test_unlink_range_bidirectional_link` unit test according to the documentation - now this test fails. - enhance `test_intrusive_list::test_splice_range_self` unit test to verify also `etl_previous` links after splicing lists - now unit test crashes. * Fix bug in the `void etl::unlink(first, last)` for bidirectional links. - `test_unlink_range_bidirectional_link` unit test now is green. - `test_intrusive_list::test_splice_range_self` is not crashing anymore and green. commit be5a6e2951c1260c3224315729ea775edf05884c Author: John Wellbelove Date: Mon Jul 14 08:43:20 2025 +0100 Added CRC8 and CRC16 opensafety algorithms commit 73e354c3be952409cd3d90577e220de1b7fffabb Author: John Wellbelove Date: Mon Jul 14 08:42:27 2025 +0100 Added constexpr for delegate invocations commit 8e02bb305929325a8187624eab5996a01656fca5 Author: John Wellbelove Date: Sat Jul 12 12:53:31 2025 +0100 Strengthened static assert tests Changed enable_if checks to static asserts commit dffd86544ce2e8e76350fed7a93aacb0fd97aaa8 Author: John Wellbelove Date: Sat Jul 12 12:52:42 2025 +0100 Added etl::type_lists_are_convertible commit 400f438958018a732a98e995ed249a40a84f15ed Author: John Wellbelove Date: Sun Jul 13 10:19:09 2025 +0100 Update README.md commit 69f34515e055ce4d07efae35f8896df424feaa99 Author: John Wellbelove Date: Sun Jul 13 09:32:17 2025 +0100 Update README.md commit e4620be180fc8a39ad94c548b0046fae7e7794dc Author: John Wellbelove Date: Sun Jul 13 09:23:28 2025 +0100 Update README.md commit fa77f58247f8ce540b4bc6d68c421504b6f292c2 Author: John Wellbelove Date: Fri Jul 11 15:48:34 2025 +0100 Updated version and release notes commit 1a430f4029c5a468e837219cee05eb67bf140ed2 Author: Roland Reichwein Date: Fri Jul 11 16:44:59 2025 +0200 Fix compile error in closure.h by using etl::forward (#1147) commit 7f7127a6ab992ae3a77ae4315b14389c8062e7d3 Author: John Wellbelove Date: Fri Jul 11 11:46:47 2025 +0100 Added doxygen comments to etl::closure Added bind member function for the full set of arguments commit ea09c5ee8d2ac8c6a5bcf7a29848aa40069002ca Author: John Wellbelove Date: Fri Jul 11 11:45:05 2025 +0100 Fixed declaration of etl::const_multiset_ext template deduction guides. commit 3da8b20dfeb6181a806335f3683d21c5ef7cdff7 Author: John Wellbelove Date: Thu Jul 10 15:41:15 2025 +0100 Updated version and release notes commit 94e18bee81ec8e62ebdcd2f815a7481ee8d8a60c Author: John Wellbelove Date: Thu Jul 10 15:19:56 2025 +0100 Undated type_traits generator commit 3dce945223dc2e499d25e4f6d5eda8e80e0e7aa6 Author: John Wellbelove Date: Thu Jul 10 12:39:25 2025 +0100 Added ETL_NOEXCEPT to etl::delegate commit 3888b623e72a97fba0d5408d7ad42b42a0e6bb65 Author: John Wellbelove Date: Thu Jul 10 10:25:20 2025 +0100 Added ETL_NOEXCEPT to etl::type_def commit dc6f028b9933035b723a6a1a9ff511fdf3643703 Author: wandns Date: Thu Jul 10 09:17:01 2025 +0000 Workaround for link libraries call on Zephyr platform (#1145) zephyr_link_interface() does not work as intended because the implementation in zephyr/cmake/modules/extensions.cmake: function(zephyr_link_interface interface) target_link_libraries(${interface} INTERFACE zephyr_interface) endfunction() is backwards, i.e., target_link_libraries(etl INTERFACE zephyr_interface) vs. target_link_libraries(zephyr_interface INTERFACE etl). The workaround results in the following CMake code being executed: target_link_libraries(zephyr_interface INTERFACE etl::etl) commit 7535d9b63a8c1a8a7342614872b4286e3b94be83 Merge: 9026ef89 99e3ebd3 Author: John Wellbelove Date: Wed Jul 9 10:22:12 2025 +0100 Merge branch 'pull-request/#1144-Add-support-for-CRC8-NRSC5' into development commit 99e3ebd3d511d34359e7a9bfded42a1780afc135 Author: John Wellbelove Date: Wed Jul 9 10:21:35 2025 +0100 Added crc8_nrsc5 for VS2022 and CMake projects commit bb496e6262687a0e409b0eca98d6a7146b578f15 Author: Cpt-Seablue <106828855+Cpt-Seablue@users.noreply.github.com> Date: Tue Jul 8 22:48:17 2025 +0300 Add support for CRC8-NRSC5 (#1144) * Add CRC8-NRSC5 parameters * Add CRC8-NRSC5 header * Add CRC8-NRSC5 header * Add tests commit 9b3d8dc96e4b0abde113981157f0110d67ae7e8c Author: John Wellbelove Date: Tue Jul 8 20:47:05 2025 +0100 Fixed lower and upper bound tests for std::less comparator commit 67dfd5c0dd6032db05d7d43747e8913cc7215423 Author: John Wellbelove Date: Tue Jul 8 20:33:37 2025 +0100 Completed tests for const_map, const_multimap, const_setand const_multiset commit 89647c14f28ee5b35ed643a4e06a890597a17b98 Author: John Wellbelove Date: Tue Jul 8 08:18:03 2025 +0100 Fixed const_map and const_set operator== to check container sizes commit 9026ef893301d7f88b8420c77956c26acf677bbb Merge: 28da1fa3 9fdc1e13 Author: John Wellbelove Date: Mon Jul 7 11:18:49 2025 +0100 Merge branch 'pull-request/#1135-Fix-error-on-running-clang-test-only' into development # Conflicts: # test/vs2022/etl.vcxproj # test/vs2022/etl.vcxproj.filters commit 28da1fa3ef65b558412df6d903e1053ab105d27f Author: rolandreichweinmusic Date: Mon Jul 7 09:55:59 2025 +0200 Fix tests on big endian (#1142) * Fix bitset_new test: bitset is implemented as little endian container * Fix test_bsd_checksum.cpp: endian test was only implemented for little endian * Fix endianness test * Fix endian in crc tests * Fix test_fnv_1 * Fix test_hash * Fix test_jenkins * Fix test_memory * Fix pearson test * Fix test_xor_rotate_checksum * Fix murmur test commit 72e71a8cb6dc23c92783b841b7aff21c0d6cf76a Author: Roland Reichwein Date: Mon Jul 7 00:53:28 2025 +0200 Fix build of tuple on clang >= 19 (#1141) commit f2d9ec18a4c0ae75d712333d70a717c2dcac6725 Author: John Wellbelove Date: Sun Jul 6 23:46:52 2025 +0100 Changed name of macro Added macro to etl traits commit 2c3eee4c589218c5b4bfb42975c73081b483eaa9 Author: Roland Reichwein Date: Mon Jul 7 00:28:55 2025 +0200 Byteswap depends on individual availability of std::byteswap (#1140) commit cb6b384f886d7ae39e9b0d32ee388ae3decca615 Author: Roland Reichwein Date: Sun Jul 6 21:59:39 2025 +0200 Cleanup to get more independent of std (#1139) * Remove redundant test.sh * Fix includes according to usage / dependency in individual header files commit 580733772112fbfe23490fb01348b0594afc2fd9 Author: Roland Reichwein Date: Sun Jul 6 21:30:42 2025 +0200 Ignore deprecated float_denorm_style (#1138) commit feeb0d480aded01f60a1e0c932828efb66753068 Author: John Wellbelove Date: Sun Jul 6 20:24:19 2025 +0100 Fixed C++03 compatibility Added syntax checks for closure.h commit 3c783e2de739f7723e67c789ffd9ada36cbf47ec Author: Roland Reichwein Date: Sat Jun 28 12:18:46 2025 +0200 Add etl::closure (#1137) commit 3784991dd2f94c47b18249dab09a4bbcc9b58613 Author: John Wellbelove Date: Sat Jun 28 09:05:50 2025 +0100 Added const_set_constexpr tests commit 5f73295392d0d021cdc98e4ed99909c11f2f1444 Author: John Wellbelove Date: Sat Jun 28 08:53:48 2025 +0100 Modified const_map & const_multimap type definitions Added const_set commit 79f93b797b7dc012e8ef59df267d3a56ab39b55d Author: John Wellbelove Date: Fri Jun 27 09:33:51 2025 +0100 Remove const_map test commit 39469d29dc2d8558ba738552a8b3458491256487 Author: John Wellbelove Date: Fri Jun 27 09:28:58 2025 +0100 Revert "Split classes into ETL standard top level and 'i' base classes." This reverts commit de13fb8afea9aa2777958d902336dcb04f87968e. # Conflicts: # include/etl/const_map.h # include/etl/const_multimap.h # test/test_const_map.cpp # test/test_const_map_constexpr.cpp # test/test_const_multimap.cpp # test/test_const_multimap_constexpr.cpp # test/vs2022/etl.vcxproj # test/vs2022/etl.vcxproj.filters commit f6b969eeba85d3c835d7bc4e9111bd7d003dd085 Author: John Wellbelove Date: Fri Jun 27 09:26:23 2025 +0100 Revert "etl::const_map completed" This reverts commit 697cd0a5aaa87ab9da6d1ad337a6c55d9934be57. # Conflicts: # include/etl/const_map.h commit 3db20a4e917f445467f408c6291ea23ecf25a6ea Author: John Wellbelove Date: Fri Jun 27 09:25:03 2025 +0100 Revert "Added const_map_ext and const_multimap_ext" This reverts commit 8591569eb530a33a0d136bb5bfe2d1fe8c8d2f31. # Conflicts: # include/etl/const_map.h # test/test_const_map.cpp commit a94d0ce9868fec1825bd2247c3d93b2510bce323 Author: John Wellbelove Date: Fri Jun 27 09:22:31 2025 +0100 Revert "Work in progress" This reverts commit 799280f615c4c46d68571e990926f2dd2fc3d64f. # Conflicts: # include/etl/const_map.h # test/test_const_map.cpp commit 52cd92d31aeee15e54a6323d162c327d36fce82a Author: John Wellbelove Date: Thu Jun 26 20:22:41 2025 +0100 Minor format change commit 3ec2db51c83738650818ac96aa4a376fe7424a50 Author: Roland Reichwein Date: Wed Jun 25 19:38:25 2025 +0200 Fix error on running clang test only (#1135) * Fix error on running clang test only Consolidate tests by factoring out redundant test function * Make run-tests.sh executable commit 8591569eb530a33a0d136bb5bfe2d1fe8c8d2f31 Author: John Wellbelove Date: Wed Jun 25 14:47:47 2025 +0100 Added const_map_ext and const_multimap_ext commit de13fb8afea9aa2777958d902336dcb04f87968e Author: John Wellbelove Date: Tue Jun 24 13:24:17 2025 +0100 Split classes into ETL standard top level and 'i' base classes. Split into const and constexpr unit tests files commit 4808919caf0cf8e7ef97014ec936852690cc3164 Author: John Wellbelove Date: Tue Jun 24 13:19:56 2025 +0100 Added value_compare to lexicographical_compare call commit 6530c9625ff26aab07d4c34be4949a2594062892 Author: John Wellbelove Date: Sun Jun 22 11:13:07 2025 +0100 Modified to have iconst_map base type commit 4d10d47f5ef40f13dad35d360cd3dcce5e104697 Author: John Wellbelove Date: Mon Jun 16 08:30:35 2025 +0100 Removed non-const iterator and pointer types Updated Doxygen comments commit 697cd0a5aaa87ab9da6d1ad337a6c55d9934be57 Author: John Wellbelove Date: Sun Jun 15 20:11:08 2025 +0100 etl::const_map completed commit 4dee5e81cd0007fabf393d2aa1e9495bde432fb5 Author: John Wellbelove Date: Sun Jun 15 17:32:49 2025 +0100 Work in progress commit ae4301146867f7f63098a8b422fbe864e0edaedd Author: John Wellbelove Date: Sun Jun 15 17:32:27 2025 +0100 Fixed reversed struct greater parameters commit 799280f615c4c46d68571e990926f2dd2fc3d64f Author: John Wellbelove Date: Sat Jun 14 19:50:41 2025 +0100 Work in progress commit 9fdc1e1326543f248bc934886676f234e3d0e0c0 Author: John Wellbelove Date: Thu Jun 26 20:22:41 2025 +0100 Minor format change commit 51040d1a2847352f03cd54040071c20c28049623 Author: Roland Reichwein Date: Wed Jun 25 19:38:25 2025 +0200 Fix error on running clang test only (#1135) * Fix error on running clang test only Consolidate tests by factoring out redundant test function * Make run-tests.sh executable commit 0f408a43bafec71d27af9212454130f7ae5a7219 Author: rolandreichweinmusic Date: Wed Jun 25 19:09:37 2025 +0200 Fix gamma.h on i386 (#1136) Add tests for gamma decode commit 64eb9742f0c9e3694345b3f17691b1c5d4792233 Author: John Wellbelove Date: Wed Jun 25 14:47:47 2025 +0100 Added const_map_ext and const_multimap_ext commit e84be139c5a58ff199f03a6229002818ed9698ed Author: John Wellbelove Date: Tue Jun 24 13:24:17 2025 +0100 Split classes into ETL standard top level and 'i' base classes. Split into const and constexpr unit tests files commit d458811c263a0a237ca73ecff2922bad3b94b654 Author: John Wellbelove Date: Tue Jun 24 13:19:56 2025 +0100 Added value_compare to lexicographical_compare call commit 185557db59c88e695f8b4337bf1a56e66937aca1 Author: Roland Reichwein Date: Sat Jun 21 17:25:10 2025 +0200 Fix usage of template keyword (#1131) For non-GCC-compilers, the template keyword is being used in parameter_pack.h for referring to a template template member. However, clang 19 and 20 don't accept this. It should be verified which compiler really needs the template keyword here at all. If not, the if-branch can be removed. Removed redundant ETL_USING_WIDE_CHARACTERS Added using_libc_wchar_h to ETL traits #1127 type_traits.h and C++03 Changed many instances of mem_copy to mem_move commit 62ffe81c1f79bf246a20d01d126ed7474f1cf2ee Author: John Wellbelove Date: Sun Jun 22 11:13:07 2025 +0100 Modified to have iconst_map base type commit bcf00d008eff3540919bed169d57c80f3a1c71f7 Author: Roland Reichwein Date: Sat Jun 21 17:25:10 2025 +0200 Fix usage of template keyword (#1131) For non-GCC-compilers, the template keyword is being used in parameter_pack.h for referring to a template template member. However, clang 19 and 20 don't accept this. It should be verified which compiler really needs the template keyword here at all. If not, the if-branch can be removed. commit eb6df0ec82de415e71c1a654360cb89cee727b53 Author: John Wellbelove Date: Mon Jun 16 08:30:35 2025 +0100 Removed non-const iterator and pointer types Updated Doxygen comments commit 609dc3dc2d26a9b38b9743efa05fa30364c4ceb8 Author: John Wellbelove Date: Sun Jun 15 20:11:08 2025 +0100 etl::const_map completed commit a2efcd2fe718b06cbbb1ef2e370a47df42b7786b Author: John Wellbelove Date: Sun Jun 15 17:32:49 2025 +0100 Work in progress commit 16a61050cad143b505ddbbe8fd30499b3e7000b1 Author: John Wellbelove Date: Sun Jun 15 17:32:27 2025 +0100 Fixed reversed struct greater parameters commit 9832157fc4c3b5a0bcfd0402903592ef576bba98 Author: John Wellbelove Date: Sat Jun 14 19:50:41 2025 +0100 Work in progress commit ad9a17b6db391ee029a17cbeda9a485493e535b7 Author: John Wellbelove Date: Thu Jun 12 18:32:00 2025 +0100 Removed redundant ETL_USING_WIDE_CHARACTERS Added using_libc_wchar_h to ETL traits commit 293c7dfcfc9582cf955a4d72264f92db4bba3c8e Author: John Wellbelove Date: Thu Jun 12 13:22:32 2025 +0100 Update release commit a037af120b25d81332ee33b49cd034657b31d733 Merge: 964e5397 cd273e77 Author: John Wellbelove Date: Thu Jun 12 13:15:38 2025 +0100 Merge branch 'hotfix/Accomodate-libc++-with-disabled-wchar_t-features' into development # Conflicts: # include/etl/basic_string.h commit 964e53974a6228d783a2c6fb4e7cec74915d5cf4 Merge: 8441069b e4977a82 Author: John Wellbelove Date: Thu Jun 12 13:14:05 2025 +0100 Merge branch 'hotfix/#1124-alignmenth-wont-compile-as-c03' into development commit 8441069b71fbd0b69ebcded444ef497f767d9e81 Author: John Wellbelove Date: Thu Jun 12 13:13:34 2025 +0100 Fixed possible nullptr references commit 8659091ff3549abce7f241e6fe9aa0d937b52327 Author: John Wellbelove Date: Wed Jun 11 11:13:27 2025 +0100 Fixed std::string_view include warning for < C++17 commit 130859c3b7778181c5e6544c6d8efb479e57220e Author: John Wellbelove Date: Wed Jun 11 10:13:19 2025 +0100 Made destructor compatible with C++03 commit 400d6d7da07b306d4458eed87968c98b4e42a3e4 Author: Roland Reichwein Date: Wed Jun 11 14:16:06 2025 +0200 For cogapp, use cog instead of python (#1125) commit e4977a82182705fdc94216f90c063d6b3a3bf8bd Author: John Wellbelove Date: Wed Jun 11 10:13:19 2025 +0100 Made destructor compatible with C++03 commit be5537ec0a6b114732bd2a5f6cbc1af1ebbf7535 Author: John Wellbelove Date: Sun Jun 8 14:24:19 2025 +0100 Updated release notes commit 7889d44db6e1499f25cbddcaac1ac681dce12b08 Author: Drew Rife Date: Sun Jun 8 09:21:14 2025 -0400 chore: add newline at end of file (#1122) commit a85e5171961966e0cb7387f9822d1d5c7577924a Author: John Wellbelove Date: Sun Jun 8 11:19:54 2025 +0100 Updated release notes and version commit 933da4dcb434b1b4331b4571e0d8eeee76ac7d26 Author: John Wellbelove Date: Fri Jun 6 18:18:16 2025 +0100 Added C++23 Preview configuration commit 59eab34162e79198fa15f2e39621ec6235e90f91 Author: John Wellbelove Date: Fri Jun 6 17:27:43 2025 +0100 Used mem_copy and mem_move to optimise vectors of pointers commit 2ff1ed1a12d26cd9575929540b7d6939f11be03c Author: John Wellbelove Date: Fri Jun 6 13:53:26 2025 +0100 Removed instances of ETL_NTH_TYPE_FORCE_CPP03_IMPLEMENTATION commit 3e9f4a99edaa44227a75da5cce1517171c93e568 Author: John Wellbelove Date: Fri Jun 6 12:17:49 2025 +0100 #1119 Forced compiler error in nth_type.h breaks containers for C++03 # Conflicts: # include/etl/nth_type.h commit 2085295358bf05b17c80a3b3418d6e5bf2940913 Author: John Wellbelove Date: Fri Jun 6 12:17:49 2025 +0100 #1119 Forced compiler error in nth_type.h breaks containers for C++03 commit 896a2e43b73d0145d3dfb214333435be50c30962 Author: John Wellbelove Date: Fri Jun 6 10:15:15 2025 +0100 Disable std::tuple_index and std::tuple_element forward declarations for MacOS and Clang commit b56394a84f0ecc7ecb34d2fa360e21782d63acc0 Author: John Wellbelove Date: Fri Jun 6 09:39:21 2025 +0100 Further optimisation of etl::basic_string::insert by using etl::mem_move() commit 1433fb8f25ad89536a9d3bc3d5e90113503b2d0b Author: John Wellbelove Date: Fri Jun 6 09:37:53 2025 +0100 Fixed usage of structured bindings for tuple, when not using the STL commit 78d3c45cfde1eec795b93bebf9329548ca90ad67 Author: John Wellbelove Date: Thu Jun 5 12:01:37 2025 +0100 Fixed const&& move constructors # Conflicts: # include/etl/tuple.h commit ccb37a12a3a85b9d2fd43488177cbc0867896bb8 Author: John Wellbelove Date: Thu Jun 5 09:55:28 2025 +0100 Fixed const&& move constructors # Conflicts: # include/etl/tuple.h commit e2f2a39a977c2fef18db8d50724bbc031c7f259f Author: Roland Reichwein Date: Thu Jun 5 10:54:43 2025 +0200 Fix forward in tuple ctor (#1116) commit ea89cf79bc223f19f8ec67a5ed9f5731232c86dd Author: John Wellbelove Date: Wed Jun 4 19:14:03 2025 +0100 Updated release commit a1367fc05f1a7bc176961d239de78c08ddeaac27 Author: Roland Reichwein Date: Wed Jun 4 20:05:41 2025 +0200 Conditionally use wchar.h (#1115) commit cd273e777dd83ec95fa6191f6d2f11fdd712e552 Author: John Wellbelove Date: Wed Jun 4 10:12:01 2025 +0100 Initial solution commit fe6fd3517400c9db0ffee20dac6639327f17178a Author: John Wellbelove Date: Mon Jun 2 23:38:15 2025 +0100 Updated version commit 6a1211c85422e7f1a4cf0d98ac7bff3d1263b306 Author: Eden Frosst Date: Mon Jun 2 18:21:48 2025 -0400 Fix West support and add ETL configuration options to Kconfig (#1114) * Fix West support * Add ETL Kconfig options commit bf8e92430823bf0383f67eeeb085bd48ee993c72 Author: Roland Reichwein Date: Tue Jun 3 00:11:00 2025 +0200 Add missing header wchar.h for usage of wcslen() (#1113) commit 0f9a8450501605d56f64d3de7a887612035888e9 Merge: acad52a9 7f86d076 Author: John Wellbelove Date: Mon Jun 2 10:53:45 2025 +0100 Merge branch 'pull-request/#955-Implements-deferred-callback-timer-with-optional-priority' of https://github.com/ETLCPP/etl into pull-request/#955-Implements-deferred-callback-timer-with-optional-priority commit acad52a9a41b5fb06a551aee8aee8cfb74571f29 Author: Mario Luzeiro Date: Tue Feb 4 10:05:20 2025 +0000 Implements deferred callback timer with optional priority (#955) * Refactored callback_timer_locked to allow base class extention of tick method * Implement callback timer deferred with priority option --------- Co-authored-by: Mario Luzeiro commit 7f86d07628c5849de18407c4d7dec2609513a66b Author: Mario Luzeiro Date: Tue Feb 4 10:05:20 2025 +0000 Implements deferred callback timer with optional priority (#955) * Refactored callback_timer_locked to allow base class extention of tick method * Implement callback timer deferred with priority option --------- Co-authored-by: Mario Luzeiro --- .bazelrc | 26 + .bazelversion | 1 + .clang-format | 215 +- .clang-tidy | 182 + .coderabbit.yaml | 200 + .devcontainer/Dockerfile | 82 +- .devcontainer/armhf/Dockerfile | 61 + .devcontainer/armhf/devcontainer.json | 29 + .devcontainer/armhf/toolchain-armhf.cmake | 21 + .devcontainer/clang10/devcontainer.json | 3 +- .devcontainer/clang11/devcontainer.json | 3 +- .devcontainer/clang12/devcontainer.json | 3 +- .devcontainer/clang13/devcontainer.json | 3 +- .devcontainer/clang14/devcontainer.json | 3 +- .devcontainer/clang15/devcontainer.json | 3 +- .devcontainer/clang16/devcontainer.json | 3 +- .devcontainer/clang17/devcontainer.json | 3 +- .devcontainer/clang18/devcontainer.json | 3 +- .devcontainer/clang19/devcontainer.json | 3 +- .devcontainer/clang20/devcontainer.json | 3 +- .devcontainer/clang21/devcontainer.json | 13 + .devcontainer/clang7/devcontainer.json | 3 +- .devcontainer/clang8/devcontainer.json | 3 +- .devcontainer/clang9/devcontainer.json | 3 +- .devcontainer/context/reinstall-cmake.sh | 291 - .devcontainer/devcontainer.json | 3 +- .devcontainer/gcc09/devcontainer.json | 3 +- .devcontainer/gcc10/devcontainer.json | 3 +- .devcontainer/gcc11/devcontainer.json | 3 +- .devcontainer/gcc12/devcontainer.json | 3 +- .devcontainer/gcc13/devcontainer.json | 3 +- .devcontainer/gcc14/devcontainer.json | 3 +- .devcontainer/gcc15/devcontainer.json | 3 +- .devcontainer/i386/Dockerfile | 61 + .devcontainer/i386/devcontainer.json | 29 + .devcontainer/i386/toolchain-i386.cmake | 21 + .devcontainer/powerpc/Dockerfile | 85 + .devcontainer/powerpc/devcontainer.json | 29 + .devcontainer/powerpc/toolchain-powerpc.cmake | 21 + .devcontainer/riscv64/Dockerfile | 61 + .devcontainer/riscv64/devcontainer.json | 29 + .devcontainer/riscv64/toolchain-riscv64.cmake | 20 + .devcontainer/run-tests.sh | 56 + .devcontainer/s390x/Dockerfile | 61 + .devcontainer/s390x/devcontainer.json | 29 + .devcontainer/s390x/toolchain-s390x.cmake | 21 + .devcontainer/ubuntu-26.04/Dockerfile | 20 + .github/workflows/bazel-gcc-c++23-no-stl.yml | 22 + .github/workflows/clang-c++11.yml | 40 +- .github/workflows/clang-c++14.yml | 40 +- .github/workflows/clang-c++17.yml | 40 +- .github/workflows/clang-c++20.yml | 73 +- .github/workflows/clang-c++23.yml | 127 +- .github/workflows/clang-c++26.yml | 210 + .github/workflows/clang-format.yaml | 43 + .github/workflows/clang-format_update.yaml | 21 + .github/workflows/clang-syntax-checks.yml | 139 +- .github/workflows/clang-tidy.yaml | 29 + .github/workflows/coverage.yml | 68 + .../workflows/deploy-etl-documentation.yml | 44 + .github/workflows/gcc-c++11.yml | 11 +- .github/workflows/gcc-c++14.yml | 11 +- .github/workflows/gcc-c++17.yml | 11 +- .github/workflows/gcc-c++20.yml | 19 +- .github/workflows/gcc-c++23-armhf.yml | 29 + .github/workflows/gcc-c++23-i386.yml | 29 + .github/workflows/gcc-c++23-powerpc.yml | 29 + .github/workflows/gcc-c++23-riscv64.yml | 29 + .github/workflows/gcc-c++23-s390x.yml | 29 + .github/workflows/gcc-c++23.yml | 35 +- .github/workflows/gcc-c++26.yml | 97 + .github/workflows/gcc-syntax-checks.yml | 129 +- .github/workflows/generator.yml | 24 + .github/workflows/meson-gcc-c++23-no-stl.yml | 31 + .github/workflows/msvc.yml | 13 +- .github/workflows/platformio-update.yml | 26 + .gitignore | 22 + .gitmodules | 0 .treefmt.toml | 45 + BUILD.bazel | 9 + CONTRIBUTING.md | 14 +- Converting header guards.txt | 12 + DOCUMENTATION.md | 144 + MODULE.bazel | 7 + MODULE.bazel.lock | 205 + README.md | 223 +- arduino/Embedded_Template_Library.h | 154 +- arduino/library-arduino.json | 2 +- arduino/library-arduino.properties | 2 +- cmake/GetGitRevisionDescription.cmake | 13 + docs/IO/_index.md | 6 + docs/IO/bip_buffer_spsc_atomic.md | 152 + docs/IO/buffer_descriptors.md | 277 + docs/IO/debounce.md | 246 + docs/IO/debounce.png | Bin 0 -> 35073 bytes docs/IO/io_port.md | 411 + docs/Is the ETL free.md | 75 + docs/_index.md | 131 + docs/about.md | 56 + docs/binary/_index.md | 6 + docs/binary/binary.md | 574 + docs/binary/bit.md | 117 + docs/binary/byte.md | 149 + docs/binary/flags.md | 144 + docs/blog/_index.md | 15 + docs/blog/graphics/Reflection1.png | Bin 0 -> 3825 bytes docs/blog/graphics/_index.md | 5 + .../applications-of-dot-and-cross-products.md | 71 + .../determining-line-line-intersections.md | 115 + docs/blog/graphics/dot-and-cross-products.md | 26 + docs/blog/graphics/images/DotCross1.png | Bin 0 -> 4453 bytes docs/blog/graphics/images/DotCross3.png | Bin 0 -> 12673 bytes docs/blog/graphics/images/DotCross4.png | Bin 0 -> 6966 bytes .../graphics/images/DotCrossCoordinates.png | Bin 0 -> 2346 bytes docs/blog/graphics/images/LineCross1.png | Bin 0 -> 7179 bytes docs/blog/graphics/images/LineCross2.png | Bin 0 -> 6416 bytes docs/blog/graphics/images/Reflection1.png | Bin 0 -> 3841 bytes docs/blog/graphics/images/ScanRectangle1.png | Bin 0 -> 5075 bytes docs/blog/graphics/images/ScanRectangle2.png | Bin 0 -> 3611 bytes docs/blog/graphics/images/ScanRectangle3.png | Bin 0 -> 6791 bytes docs/blog/graphics/images/ScanRectangle4.png | Bin 0 -> 9500 bytes docs/blog/graphics/images/ScanRectangle5.png | Bin 0 -> 11322 bytes docs/blog/graphics/images/ScanRectangle6.png | Bin 0 -> 8346 bytes ...-arbitrarily-rotated-rectangular-region.md | 41 + .../implementing-a-low-cost-moving-average.md | 70 + docs/callbacks/_index.md | 8 + docs/callbacks/callback-service.md | 80 + docs/callbacks/closure.md | 75 + docs/callbacks/delegate-service.md | 93 + .../callbacks/delegate-vs-inplace_function.md | 220 + docs/callbacks/delegate.md | 421 + docs/callbacks/delegate_observable.md | 115 + docs/callbacks/function.md | 332 + docs/callbacks/inplace_function.md | 414 + docs/callbacks/signal.md | 327 + docs/chrono/_index.md | 12 + docs/chrono/chrono-literals.md | 38 + docs/chrono/clocks.md | 123 + docs/chrono/day.md | 317 + docs/chrono/duration/_index.md | 16 + docs/chrono/duration/duration.md | 526 + docs/chrono/duration/duration_cast.md | 21 + docs/chrono/duration/duration_values.md | 38 + docs/chrono/hh_mm_ss.md | 138 + docs/chrono/last_spec.md | 25 + docs/chrono/month/_index.md | 18 + docs/chrono/month/month.md | 337 + docs/chrono/month/month_day.md | 171 + docs/chrono/month/month_day_last.md | 147 + docs/chrono/month/month_weekday.md | 156 + docs/chrono/month/month_weekday_last.md | 143 + docs/chrono/operators.md | 329 + docs/chrono/time_point.md | 273 + docs/chrono/weekday/_index.md | 16 + docs/chrono/weekday/weekday.md | 386 + docs/chrono/weekday/weekday_indexed.md | 129 + docs/chrono/weekday/weekday_last.md | 107 + docs/chrono/year/_index.md | 17 + docs/chrono/year/year.md | 328 + docs/chrono/year/year_month.md | 214 + docs/chrono/year/year_month_day.md | 277 + docs/chrono/year/year_month_day_last.md | 251 + docs/codecs/_index.md | 6 + docs/codecs/base64.md | 464 + docs/codecs/manchester.md | 268 + docs/containers/Views/_index.md | 6 + docs/containers/Views/array-view.md | 373 + docs/containers/Views/array-wrapper.md | 266 + docs/containers/Views/multi-range.md | 291 + docs/containers/Views/multi-span.md | 189 + docs/containers/Views/poly-span.md | 361 + docs/containers/Views/span.md | 410 + docs/containers/_index.md | 66 + docs/containers/arrays/_index.md | 6 + docs/containers/arrays/array.md | 316 + docs/containers/arrays/multi-array.md | 39 + docs/containers/binary/_index.md | 6 + docs/containers/binary/bitset.md | 420 + docs/containers/binary/bloom-filter.md | 106 + docs/containers/lists/_index.md | 6 + docs/containers/lists/forward-list.md | 533 + .../lists/intrusive-forward-list.md | 321 + docs/containers/lists/intrusive-list.md | 337 + docs/containers/lists/list.md | 753 + docs/containers/maps/_index.md | 6 + docs/containers/maps/const-map.md | 211 + docs/containers/maps/const-multimap.md | 235 + docs/containers/maps/flat-map.md | 500 + docs/containers/maps/flat-multimap.md | 500 + docs/containers/maps/map.md | 425 + docs/containers/maps/multimap.md | 425 + docs/containers/maps/reference-flat-map.md | 429 + .../maps/reference-flat-multimap.md | 433 + docs/containers/maps/unordered-map.md | 375 + docs/containers/maps/unordered-multimap.md | 373 + docs/containers/memory/_index.md | 6 + .../fixed-sized-memory-block-allocator.md | 45 + .../memory/imemory-block-allocator.md | 84 + docs/containers/pools/_index.md | 6 + docs/containers/pools/generic-pool.md | 217 + docs/containers/pools/ipool.md | 273 + docs/containers/pools/pool.md | 239 + docs/containers/pools/variant-pool.md | 214 + docs/containers/queues & stacks/_index.md | 6 + .../queues & stacks/circular-buffer.md | 305 + docs/containers/queues & stacks/deque.md | 603 + .../queues & stacks/priority-queue.md | 134 + .../queues & stacks/queue-lockable.md | 210 + .../queues & stacks/queue-mpmc-mutex.md | 190 + .../queues & stacks/queue-spsc-atomic.md | 186 + .../queues & stacks/queue-spsc-isr.md | 214 + .../queues & stacks/queue-spsc-locked.md | 235 + docs/containers/queues & stacks/queue.md | 167 + docs/containers/queues & stacks/stack.md | 155 + docs/containers/sets/_index.md | 6 + docs/containers/sets/const-multiset.md | 336 + docs/containers/sets/const-set.md | 336 + docs/containers/sets/flat-multiset.md | 500 + docs/containers/sets/flat-set.md | 516 + docs/containers/sets/multiset.md | 416 + .../sets/reference-flat-multiset.md | 363 + docs/containers/sets/reference-flat-set.md | 363 + docs/containers/sets/set.md | 415 + docs/containers/variadics/_index.md | 6 + docs/containers/variadics/packet.md | 73 + docs/containers/variadics/tuple.md | 853 + docs/containers/variadics/variant-legacy.md | 195 + docs/containers/variadics/variant-variadic.md | 501 + docs/containers/vectors/_index.md | 6 + docs/containers/vectors/indirect-vector.md | 630 + docs/containers/vectors/multi-vector.md | 35 + docs/containers/vectors/vector.md | 477 + .../ETL-logos-icons-and-graphics.md | 13 + docs/getting-started/_index.md | 4 + docs/getting-started/arduino.md | 36 + docs/getting-started/compilers.md | 86 + docs/getting-started/contribute.md | 243 + .../enabling-compiler-built-ins.md | 80 + docs/getting-started/generators.md | 12 + docs/getting-started/header-guards.md | 19 + docs/getting-started/interfacing-with-c.md | 96 + docs/getting-started/macros.md | 148 + docs/getting-started/no-stl.md | 46 + docs/getting-started/setup.md | 224 + .../view-the-docs-locally/_index.md | 12 + .../view-the-docs-locally/hugo-commands.md | 34 + .../view-the-docs-locally/install-hugo.md | 107 + .../view-the-docs-locally/markdown.md | 16 + .../view-the-docs-locally/view-the-docs.md | 23 + docs/iterators/Iterator.md | 469 + docs/iterators/_index.md | 7 + docs/iterators/circular_iterator.md | 253 + docs/iterators/fixed_iterator.md | 82 + docs/maths/_index.md | 6 + docs/maths/absolute.md | 37 + docs/maths/checksums-hashes.md | 471 + docs/maths/comb-perm.md | 47 + docs/maths/constants.md | 198 + docs/maths/correlation.md | 131 + docs/maths/covariance.md | 121 + docs/maths/gamma.md | 75 + docs/maths/histogram.md | 352 + docs/maths/invert.md | 62 + docs/maths/is_negative.md | 12 + docs/maths/limiter.md | 50 + docs/maths/mean.md | 114 + docs/maths/pseudo_moving_average.md | 159 + docs/maths/quantize.md | 70 + docs/maths/radix.md | 18 + docs/maths/random.md | 325 + docs/maths/ratio.md | 97 + docs/maths/rescale.md | 53 + docs/maths/rms.md | 112 + docs/maths/rounded-integral-division.md | 208 + docs/maths/scaled-rounding.md | 341 + docs/maths/standard_deviation.md | 132 + docs/maths/threshold.md | 50 + docs/maths/variance.md | 119 + docs/messaging/_index.md | 23 + docs/messaging/images/message-framework.png | Bin 0 -> 8529 bytes docs/messaging/message-broker.md | 217 + docs/messaging/message-bus.md | 207 + docs/messaging/message-packet.md | 155 + docs/messaging/message-router-registry.md | 180 + docs/messaging/message-router.md | 504 + docs/messaging/message.md | 112 + .../reference-counted-message-pool.md | 139 + docs/messaging/reference-counted-messages.md | 197 + docs/messaging/shared-message.md | 79 + docs/multi-tasking/_index.md | 6 + docs/multi-tasking/cooperative-scheduler.md | 211 + docs/multi-tasking/task.md | 77 + docs/patterns/_index.md | 6 + docs/patterns/observer.md | 120 + docs/patterns/overload.md | 63 + docs/patterns/singleton-base.md | 58 + docs/patterns/singleton.md | 123 + docs/patterns/successor.md | 216 + docs/patterns/visitor.md | 196 + docs/pseudo-containers/_index.md | 6 + docs/pseudo-containers/bresenham_line.md | 154 + docs/ranges/_index.md | 6 + docs/ranges/ranges.md | 339 + docs/releases/_index.md | 2847 +++ docs/resourses/_index.md | 96 + docs/source/_index.md | 8 + docs/source/bazel.md | 298 + docs/source/docker.md | 292 + docs/source/generators.md | 193 + docs/source/meson.md | 119 + docs/source/source-formatting.md | 96 + docs/source/testing.md | 414 + docs/state machines/_index.md | 6 + docs/state machines/finite-state-machine.md | 542 + docs/state machines/hfsm.png | Bin 0 -> 44610 bytes .../hierarchical-finite-state-machine.md | 100 + docs/state machines/state-chart.md | 433 + docs/strings/_index.md | 46 + docs/strings/basic-format-spec.md | 410 + docs/strings/format.md | 467 + docs/strings/string-stream.md | 146 + docs/strings/string-view.md | 436 + docs/strings/string.md | 999 + docs/strings/string_utilities.md | 620 + docs/strings/to-arithmetic.md | 380 + docs/strings/to-string.md | 107 + docs/timers/_index.md | 6 + docs/timers/callback-timer-atomic.md | 274 + docs/timers/callback-timer-deferred-locked.md | 319 + docs/timers/callback-timer-interrupt.md | 294 + docs/timers/callback-timer-locked.md | 297 + docs/timers/callback-timer.md | 318 + docs/timers/message-timer-atomic.md | 288 + docs/timers/message-timer-interrupt.md | 317 + docs/timers/message-timer-locked.md | 323 + docs/timers/message-timer.md | 304 + docs/timers/timer.md | 101 + docs/tutorials/_index.md | 64 + docs/tutorials/callback-service.md | 188 + docs/tutorials/concurrent-queues.md | 27 + docs/tutorials/containers-tutorial.md | 64 + docs/tutorials/delegate-service.md | 183 + docs/tutorials/generators-tutorial.md | 44 + docs/tutorials/locked-queues.md | 99 + docs/tutorials/message-tutorial.md | 86 + docs/tutorials/observer-tutorial.md | 172 + docs/tutorials/shared-message_tutorial.md | 368 + docs/tutorials/unique_ptr-with-etl-pool.md | 61 + docs/tutorials/visitor-tutorial.md | 188 + docs/types/_index.md | 6 + docs/types/largest.md | 200 + docs/types/smallest.md | 145 + docs/types/tuple.md | 251 + docs/types/type-list.md | 776 + docs/types/type-lookup.md | 196 + docs/types/type-select.md | 60 + docs/types/type-traits.md | 461 + docs/types/type_def.md | 76 + docs/types/unaligned-type.md | 407 + docs/types/user_type.md | 28 + docs/utilities/_index.md | 4 + docs/utilities/algorithms.md | 1490 ++ docs/utilities/alignment.md | 183 + docs/utilities/atomic.md | 21 + docs/utilities/bit-stream-reader.md | 262 + docs/utilities/bit-stream-writer.md | 408 + docs/utilities/byte-stream-reader.md | 280 + docs/utilities/byte-stream-writer.md | 409 + docs/utilities/compare.md | 160 + docs/utilities/constant.md | 46 + docs/utilities/cyclic-value.md | 164 + docs/utilities/debug-count.md | 53 + docs/utilities/endian.md | 83 + docs/utilities/enum-type.md | 53 + docs/utilities/error-handler.md | 262 + docs/utilities/etl-traits.md | 104 + docs/utilities/exceptions.md | 40 + docs/utilities/expected.md | 588 + docs/utilities/function-traits.md | 140 + docs/utilities/functional.md | 219 + docs/utilities/infinite-loop.md | 39 + docs/utilities/initializer-list.md | 41 + docs/utilities/instance-count.md | 54 + docs/utilities/integral-limits.md | 31 + docs/utilities/intrusive-links.md | 483 + docs/utilities/limits.md | 7 + docs/utilities/mem_cast.md | 426 + docs/utilities/memory-model.md | 39 + docs/utilities/memory.md | 674 + docs/utilities/mutex.md | 15 + docs/utilities/not-null.md | 121 + docs/utilities/nth-type.md | 36 + docs/utilities/null-type.md | 23 + docs/utilities/nullptr.md | 16 + docs/utilities/numeric.md | 46 + docs/utilities/optional.md | 271 + docs/utilities/parameter-pack.md | 93 + docs/utilities/parameter-type.md | 54 + docs/utilities/reference-counted-objects.md | 162 + docs/utilities/result.md | 195 + docs/utilities/static-assert.md | 26 + docs/utilities/type-id.md | 112 + docs/utilities/utility.md | 531 + docs/utilities/versions.md | 34 + .../Device/STM32F401RETx/system_stm32f4xx.c | 959 +- .../ArmTimerCallbacks - C++/etl_profile.h | 2 +- examples/ArmTimerCallbacks - C++/main.cpp | 80 +- .../FunctionInterruptSimulation.cpp | 11 +- .../FunctionInterruptSimulation.cpp | 13 +- .../MutexMessageRouter/MutexMessageRouter.cpp | 16 +- examples/QueuedFSM/QueuedFSM.cpp | 7 +- .../QueuedMessageRouter.cpp | 5 +- examples/Scheduler/Scheduler.cpp | 12 +- examples/SharedMessage/SharedMessage.cpp | 51 +- examples/UniquePtrWithPool/CmakeLists.txt | 10 + examples/UniquePtrWithPool/Main.cpp | 38 + .../UniquePtrWithPool/UniquePtrWithPool.sln | 31 + .../UniquePtrWithPool.vcxproj | 38 +- examples/platformio/src/main.cpp | 12 +- hugo/archetypes/default.md | 5 + hugo/assets/css/custom.css | 423 + hugo/assets/version.txt | 1 + hugo/go.mod | 5 + hugo/go.sum | 2 + hugo/hugo.toml | 79 + hugo/layouts/404.html | 20 + hugo/layouts/_default/baseof.html | 16 + hugo/layouts/_partials/footer.html | 5 + hugo/layouts/_partials/head.html | 84 + hugo/layouts/index.html | 12 + hugo/layouts/shortcodes/version.html | 3 + hugo/static/.htaccess | 7 + hugo/static/Linux.png | Bin 0 -> 1738 bytes hugo/static/Windows.png | Bin 0 -> 2960 bytes hugo/static/apple-touch-icon.png | Bin 0 -> 9918 bytes hugo/static/css/syntax-dark.css | 79 + hugo/static/css/syntax-light.css | 74 + hugo/static/favicon-16x16.png | Bin 0 -> 15993 bytes hugo/static/favicon-32x32.png | Bin 0 -> 19081 bytes hugo/static/favicon.ico | Bin 0 -> 1150 bytes hugo/static/favicon.svg | 1 + .../fonts/roboto-mono-v31-latin-500.woff2 | Bin 0 -> 12936 bytes .../fonts/roboto-v51-latin-regular.woff2 | Bin 0 -> 21884 bytes hugo/static/images/logo.png | Bin 0 -> 3292 bytes hugo/static/macOS.png | Bin 0 -> 2123 bytes images/QR Github.png | Bin 0 -> 20490 bytes images/apple-touch-icon.png | Bin 0 -> 9918 bytes images/favicon-96.png | Bin 0 -> 6098 bytes images/favicon.svg | 1 + images/site.webmanifest | 21 + images/web-app-manifest-192x192.png | Bin 0 -> 11210 bytes images/web-app-manifest-512x512.png | Bin 0 -> 28333 bytes include/etl/absolute.h | 62 +- include/etl/algorithm.h | 5708 +++++- include/etl/alignment.h | 541 +- include/etl/array.h | 402 +- include/etl/array_view.h | 258 +- include/etl/array_wrapper.h | 116 +- include/etl/atomic.h | 2 +- include/etl/atomic/atomic_gcc_sync.h | 708 +- include/etl/atomic/atomic_std.h | 185 +- include/etl/base64.h | 61 +- include/etl/base64_decoder.h | 346 +- include/etl/base64_encoder.h | 377 +- include/etl/basic_format_spec.h | 249 +- include/etl/basic_string.h | 953 +- include/etl/basic_string_stream.h | 52 +- include/etl/binary.h | 575 +- include/etl/bip_buffer_spsc_atomic.h | 119 +- include/etl/bit.h | 85 +- include/etl/bit_stream.h | 158 +- include/etl/bloom_filter.h | 40 +- include/etl/bresenham_line.h | 25 +- include/etl/buffer_descriptors.h | 35 +- include/etl/byte.h | 96 +- include/etl/byte_stream.h | 105 +- include/etl/callback.h | 25 +- include/etl/callback_service.h | 60 +- include/etl/callback_timer.h | 762 +- include/etl/callback_timer_atomic.h | 163 +- include/etl/callback_timer_deferred_locked.h | 202 + include/etl/callback_timer_interrupt.h | 130 +- include/etl/callback_timer_locked.h | 269 +- include/etl/char_traits.h | 90 +- include/etl/checksum.h | 12 +- include/etl/chrono.h | 30 +- include/etl/circular_buffer.h | 184 +- include/etl/circular_iterator.h | 118 +- include/etl/closure.h | 393 + include/etl/combinations.h | 16 +- include/etl/compare.h | 4 +- include/etl/concepts.h | 246 + include/etl/const_map.h | 660 + include/etl/const_multimap.h | 627 + include/etl/const_multiset.h | 573 + include/etl/const_set.h | 549 + include/etl/constant.h | 2 +- include/etl/container.h | 3 - include/etl/correlation.h | 42 +- include/etl/covariance.h | 38 +- include/etl/crc.h | 9 +- include/etl/crc1.h | 6 +- include/etl/crc16.h | 4 +- include/etl/crc16_a.h | 4 +- include/etl/crc16_arc.h | 4 +- include/etl/crc16_aug_ccitt.h | 8 +- include/etl/crc16_buypass.h | 6 +- include/etl/crc16_ccitt.h | 4 +- include/etl/crc16_cdma2000.h | 4 +- include/etl/crc16_dds110.h | 4 +- include/etl/crc16_dectr.h | 4 +- include/etl/crc16_dectx.h | 4 +- include/etl/crc16_dnp.h | 4 +- include/etl/crc16_en13757.h | 4 +- include/etl/crc16_genibus.h | 6 +- include/etl/crc16_kermit.h | 6 +- include/etl/crc16_m17.h | 4 +- include/etl/crc16_maxim.h | 6 +- include/etl/crc16_mcrf4xx.h | 4 +- include/etl/crc16_modbus.h | 6 +- include/etl/crc16_opensafety_a.h | 78 + include/etl/crc16_opensafety_b.h | 78 + include/etl/crc16_profibus.h | 6 +- include/etl/crc16_riello.h | 4 +- include/etl/crc16_t10dif.h | 4 +- include/etl/crc16_teledisk.h | 6 +- include/etl/crc16_tms37157.h | 6 +- include/etl/crc16_usb.h | 6 +- include/etl/crc16_x25.h | 6 +- include/etl/crc16_xmodem.h | 6 +- include/etl/crc32.h | 4 +- include/etl/crc32_bzip2.h | 4 +- include/etl/crc32_c.h | 4 +- include/etl/crc32_d.h | 4 +- include/etl/crc32_jamcrc.h | 4 +- include/etl/crc32_mpeg2.h | 4 +- include/etl/crc32_posix.h | 4 +- include/etl/crc32_q.h | 4 +- include/etl/crc32_xfer.h | 4 +- include/etl/crc64_ecma.h | 4 +- include/etl/crc64_iso.h | 78 + include/etl/crc8_ccitt.h | 4 +- include/etl/crc8_cdma2000.h | 6 +- include/etl/crc8_darc.h | 6 +- include/etl/crc8_dvbs2.h | 6 +- include/etl/crc8_ebu.h | 6 +- include/etl/crc8_icode.h | 6 +- include/etl/crc8_itu.h | 6 +- include/etl/crc8_j1850.h | 6 +- include/etl/crc8_j1850_zero.h | 6 +- include/etl/crc8_maxim.h | 6 +- include/etl/crc8_nrsc5.h | 76 + include/etl/crc8_opensafety.h | 76 + include/etl/crc8_rohc.h | 6 +- include/etl/crc8_wcdma.h | 6 +- include/etl/cstring.h | 2 +- include/etl/cyclic_value.h | 104 +- include/etl/debounce.h | 192 +- include/etl/debug_count.h | 32 +- include/etl/delegate_observable.h | 209 + include/etl/delegate_observer.h | 262 - include/etl/delegate_service.h | 27 +- include/etl/deprecated/factory.h | 92 +- include/etl/deque.h | 663 +- include/etl/doxygen.h | 10 +- include/etl/endianness.h | 22 +- include/etl/enum_type.h | 86 +- include/etl/error_handler.h | 366 +- include/etl/exception.h | 65 +- include/etl/expected.h | 904 +- include/etl/experimental/bit_cast.h | 16 +- include/etl/experimental/class_traits.h | 100 +- include/etl/experimental/icache.h | 38 +- include/etl/experimental/mem_cast.h | 2 - include/etl/experimental/singleton.h | 7 +- include/etl/factorial.h | 20 +- include/etl/fibonacci.h | 22 +- include/etl/file_error_numbers.h | 155 +- include/etl/fixed_iterator.h | 73 +- .../etl/fixed_sized_memory_block_allocator.h | 16 +- include/etl/flags.h | 38 +- include/etl/flat_map.h | 311 +- include/etl/flat_multimap.h | 120 +- include/etl/flat_multiset.h | 119 +- include/etl/flat_set.h | 115 +- include/etl/fnv_1.h | 31 +- include/etl/format.h | 2770 +++ include/etl/forward_list.h | 278 +- include/etl/frame_check_sequence.h | 29 +- include/etl/fsm.h | 1464 +- include/etl/function.h | 64 +- include/etl/function_traits.h | 287 +- include/etl/functional.h | 151 +- include/etl/gamma.h | 22 +- include/etl/gcd.h | 50 +- include/etl/generators/fsm_cpp03_generator.h | 226 + .../fsm_friend_decl_cpp03_generator.h | 45 + .../generators/fsm_fwd_decl_cpp03_generator.h | 45 + include/etl/generators/fsm_generator.h | 853 - include/etl/generators/generate.bat | 22 +- include/etl/generators/generate_fsm.bat | 4 +- include/etl/generators/generate_largest.bat | 4 +- .../generators/generate_message_packet.bat | 2 +- .../generators/generate_message_router.bat | 2 +- include/etl/generators/generate_smallest.bat | 2 +- .../etl/generators/generate_type_lookup.bat | 2 +- .../etl/generators/generate_type_select.bat | 2 +- .../etl/generators/generate_type_traits.bat | 2 +- .../etl/generators/generate_variant_pool.bat | 2 +- .../largest_alignment_cpp03_generator.h | 93 + .../etl/generators/largest_cpp03_generator.h | 77 + include/etl/generators/largest_generator.h | 452 - .../generators/largest_type_cpp03_generator.h | 94 + ...tor.h => message_packet_cpp03_generator.h} | 534 +- .../message_router_cpp03_generator.h | 483 + .../etl/generators/message_router_generator.h | 890 - .../etl/generators/smallest_cpp03_generator.h | 118 + include/etl/generators/smallest_generator.h | 432 - .../generators/type_lookup_cpp03_generator.h | 135 + .../etl/generators/type_lookup_generator.h | 337 - .../generators/type_select_cpp03_generator.h | 101 + .../etl/generators/type_select_generator.h | 177 - .../generators/type_traits_cpp03_generator.h | 55 + .../etl/generators/type_traits_generator.h | 2505 --- .../generators/variant_pool_cpp03_generator.h | 459 + .../etl/generators/variant_pool_generator.h | 620 - include/etl/generic_pool.h | 104 +- include/etl/hash.h | 156 +- include/etl/hfsm.h | 197 +- include/etl/histogram.h | 74 +- include/etl/ihash.h | 14 +- include/etl/imemory_block_allocator.h | 21 +- include/etl/index_of_type.h | 17 +- include/etl/indirect_vector.h | 374 +- include/etl/infinite_loop.h | 65 + include/etl/initializer_list.h | 116 +- include/etl/inplace_function.h | 1496 ++ include/etl/instance_count.h | 7 +- include/etl/integral_limits.h | 47 +- include/etl/intrusive_avl_tree.h | 2011 ++ include/etl/intrusive_forward_list.h | 150 +- include/etl/intrusive_links.h | 671 +- include/etl/intrusive_list.h | 124 +- include/etl/intrusive_queue.h | 64 +- include/etl/intrusive_stack.h | 63 +- include/etl/invert.h | 12 +- include/etl/invoke.h | 391 + include/etl/io_port.h | 162 +- include/etl/ipool.h | 137 +- include/etl/ireference_counted_message_pool.h | 3 +- include/etl/iterator.h | 1366 +- include/etl/jenkins.h | 11 +- include/etl/largest.h | 197 +- include/etl/lcm.h | 34 +- include/etl/limiter.h | 16 +- include/etl/limits.h | 1243 +- include/etl/list.h | 325 +- include/etl/log.h | 45 +- include/etl/macros.h | 7 +- include/etl/manchester.h | 505 + include/etl/map.h | 680 +- include/etl/math.h | 56 +- include/etl/math_constants.h | 18 +- include/etl/mean.h | 20 +- include/etl/mem_cast.h | 100 +- include/etl/memory.h | 1313 +- include/etl/memory_model.h | 11 +- include/etl/message.h | 143 +- include/etl/message_broker.h | 35 +- include/etl/message_bus.h | 239 +- include/etl/message_packet.h | 4975 +---- include/etl/message_router.h | 2764 +-- include/etl/message_router_registry.h | 72 +- include/etl/message_timer.h | 198 +- include/etl/message_timer_atomic.h | 130 +- include/etl/message_timer_interrupt.h | 137 +- include/etl/message_timer_locked.h | 139 +- include/etl/message_types.h | 2 +- include/etl/monostate.h | 2 +- include/etl/multi_array.h | 9 +- include/etl/multi_range.h | 44 +- include/etl/multi_span.h | 119 +- include/etl/multi_vector.h | 49 +- include/etl/multimap.h | 477 +- include/etl/multiset.h | 363 +- include/etl/murmur3.h | 29 +- include/etl/mutex.h | 9 +- include/etl/mutex/mutex_cmsis_os2.h | 6 +- include/etl/mutex/mutex_freertos.h | 7 +- include/etl/mutex/mutex_gcc_sync.h | 2 +- include/etl/mutex/mutex_std.h | 2 +- include/etl/mutex/mutex_threadx.h | 82 + include/etl/negative.h | 12 +- include/etl/not_null.h | 264 + include/etl/nth_type.h | 34 +- include/etl/null_type.h | 4 +- include/etl/nullptr.h | 30 +- include/etl/numeric.h | 363 +- include/etl/observer.h | 183 +- include/etl/optional.h | 948 +- include/etl/overload.h | 22 +- include/etl/packet.h | 18 +- include/etl/parameter_pack.h | 43 +- include/etl/parameter_type.h | 6 +- include/etl/pearson.h | 50 +- include/etl/permutations.h | 22 +- include/etl/placement_new.h | 23 +- include/etl/platform.h | 268 +- include/etl/poly_span.h | 298 +- include/etl/pool.h | 120 +- include/etl/power.h | 60 +- include/etl/print.h | 115 + include/etl/priority_queue.h | 170 +- include/etl/private/addressof.h | 2 +- include/etl/private/bitset_legacy.h | 189 +- include/etl/private/bitset_new.h | 1310 +- include/etl/private/choose_namespace.h | 28 +- include/etl/private/chrono/clocks.h | 32 +- include/etl/private/chrono/day.h | 133 +- include/etl/private/chrono/duration.h | 347 +- include/etl/private/chrono/hh_mm_ss.h | 54 +- include/etl/private/chrono/last_spec.h | 8 +- include/etl/private/chrono/month.h | 170 +- include/etl/private/chrono/month_day.h | 108 +- include/etl/private/chrono/month_weekday.h | 62 +- include/etl/private/chrono/operators.h | 152 +- include/etl/private/chrono/time_point.h | 72 +- include/etl/private/chrono/time_zone.h | 33 +- include/etl/private/chrono/weekday.h | 144 +- include/etl/private/chrono/year.h | 141 +- include/etl/private/chrono/year_month.h | 105 +- include/etl/private/chrono/year_month_day.h | 277 +- .../etl/private/chrono/year_month_weekday.h | 212 +- .../etl/private/comparator_is_transparent.h | 2 +- include/etl/private/crc_implementation.h | 1002 +- include/etl/private/crc_parameters.h | 13 +- include/etl/private/delegate_cpp11.h | 519 +- .../private/diagnostic_array_bounds_push.h | 7 +- .../diagnostic_cxx_11_extensions_push.h | 39 + .../private/diagnostic_cxx_20_compat_push.h | 4 +- .../etl/private/diagnostic_deprecated_push.h | 7 +- .../etl/private/diagnostic_float_equal_push.h | 3 +- .../private/diagnostic_format_security_push.h | 7 +- .../diagnostic_gnu_static_float_init_push.h | 44 + .../diagnostic_null_dereference_push.h | 7 +- .../diagnostic_pessimizing_move_push.h | 7 +- include/etl/private/diagnostic_pop.h | 7 +- .../diagnostic_self_assign_overloaded_push.h | 5 +- .../private/diagnostic_sign_conversion_push.h | 44 + .../diagnostic_stringop_overflow_push.h | 43 + .../private/diagnostic_uninitialized_push.h | 7 +- ...agnostic_unnamed_type_template_args_push.h | 39 + .../private/diagnostic_unused_function_push.h | 7 +- .../private/diagnostic_useless_cast_push.h | 7 +- include/etl/private/fsm_cpp03.h | 922 + include/etl/private/fsm_friend_decl_cpp03.h | 38 + include/etl/private/fsm_fwd_decl_cpp03.h | 38 + include/etl/private/ivectorpointer.h | 281 +- include/etl/private/largest_alignment_cpp03.h | 75 + include/etl/private/largest_cpp03.h | 52 + include/etl/private/largest_type_cpp03.h | 76 + include/etl/private/message_packet_cpp03.h | 4894 +++++ include/etl/private/message_router_cpp03.h | 2465 +++ include/etl/private/minmax_pop.h | 12 +- include/etl/private/minmax_push.h | 6 +- include/etl/private/pvoidvector.h | 218 +- include/etl/private/ranges_mini_variant.h | 426 + include/etl/private/smallest_cpp03.h | 100 + include/etl/private/to_string_helper.h | 356 +- include/etl/private/tuple_element.h | 6 +- include/etl/private/tuple_size.h | 2 +- include/etl/private/type_lookup_cpp03.h | 183 + include/etl/private/type_select_cpp03.h | 569 + include/etl/private/type_traits_cpp03.h | 60 + include/etl/private/variant_legacy.h | 554 +- include/etl/private/variant_pool_cpp03.h | 321 + .../etl/private/variant_select_do_operator.h | 3241 +++- .../etl/private/variant_select_do_visitor.h | 3241 +++- include/etl/private/variant_variadic.h | 1388 +- include/etl/private/vector_base.h | 38 +- include/etl/profiles/arduino_arm.h | 10 +- include/etl/profiles/armv5.h | 10 +- include/etl/profiles/armv5_no_stl.h | 10 +- include/etl/profiles/armv6.h | 10 +- include/etl/profiles/armv6_no_stl.h | 10 +- include/etl/profiles/armv7.h | 10 +- include/etl/profiles/armv7_no_stl.h | 10 +- include/etl/profiles/cpp03.h | 10 +- include/etl/profiles/cpp03_no_stl.h | 10 +- include/etl/profiles/cpp11.h | 10 +- include/etl/profiles/cpp11_no_stl.h | 10 +- include/etl/profiles/cpp14.h | 10 +- include/etl/profiles/cpp14_no_stl.h | 10 +- include/etl/profiles/cpp17.h | 10 +- include/etl/profiles/cpp17_no_stl.h | 10 +- include/etl/profiles/cpp20.h | 49 + include/etl/profiles/cpp20_no_stl.h | 50 + include/etl/profiles/cpp23.h | 50 + include/etl/profiles/cpp23_no_stl.h | 51 + include/etl/profiles/cpp26.h | 51 + include/etl/profiles/cpp26_no_stl.h | 52 + .../etl/profiles/determine_builtin_support.h | 159 +- include/etl/profiles/determine_compiler.h | 15 +- .../determine_compiler_language_support.h | 76 +- .../etl/profiles/determine_development_os.h | 18 +- include/etl/profiles/segger_gcc_stlport.h | 12 +- include/etl/profiles/ticc.h | 10 +- include/etl/profiles/ticc_no_stl.h | 10 +- include/etl/pseudo_moving_average.h | 54 +- include/etl/quantize.h | 17 +- include/etl/queue.h | 250 +- include/etl/queue_lockable.h | 165 +- include/etl/queue_mpmc_mutex.h | 225 +- include/etl/queue_spsc_atomic.h | 128 +- include/etl/queue_spsc_isr.h | 203 +- include/etl/queue_spsc_locked.h | 185 +- include/etl/radix.h | 2 +- include/etl/random.h | 394 +- include/etl/ranges.h | 6237 ++++++ include/etl/ratio.h | 134 +- include/etl/reference_counted_message.h | 51 +- include/etl/reference_counted_message_pool.h | 87 +- include/etl/reference_counted_object.h | 104 +- include/etl/reference_flat_map.h | 169 +- include/etl/reference_flat_multimap.h | 182 +- include/etl/reference_flat_multiset.h | 178 +- include/etl/reference_flat_set.h | 146 +- include/etl/rescale.h | 30 +- include/etl/result.h | 60 +- include/etl/rms.h | 18 +- include/etl/rounded_integral_division.h | 789 + include/etl/scaled_rounding.h | 74 +- include/etl/scheduler.h | 50 +- include/etl/set.h | 441 +- include/etl/shared_message.h | 46 +- include/etl/signal.h | 437 + include/etl/singleton.h | 21 +- include/etl/singleton_base.h | 37 +- include/etl/smallest.h | 142 +- include/etl/span.h | 810 +- include/etl/sqrt.h | 25 +- include/etl/stack.h | 179 +- include/etl/standard_deviation.h | 32 +- include/etl/state_chart.h | 194 +- include/etl/static_assert.h | 24 +- include/etl/string.h | 339 +- include/etl/string_stream.h | 8 +- include/etl/string_utilities.h | 124 +- include/etl/string_view.h | 272 +- include/etl/stringify.h | 25 +- include/etl/successor.h | 6 +- include/etl/task.h | 12 +- include/etl/threshold.h | 11 +- include/etl/timer.h | 4 +- include/etl/to_arithmetic.h | 513 +- include/etl/to_string.h | 14 +- include/etl/to_u16string.h | 13 +- include/etl/to_u32string.h | 12 +- include/etl/to_u8string.h | 13 +- include/etl/to_wstring.h | 12 +- include/etl/tuple.h | 780 +- include/etl/type_def.h | 459 +- include/etl/type_list.h | 1019 +- include/etl/type_lookup.h | 224 +- include/etl/type_select.h | 575 +- include/etl/type_traits.h | 3796 +++- include/etl/u16string.h | 335 +- include/etl/u16string_stream.h | 8 +- include/etl/u32string.h | 338 +- include/etl/u32string_stream.h | 8 +- include/etl/u8string.h | 404 +- include/etl/u8string_stream.h | 8 +- include/etl/unaligned_type.h | 513 +- include/etl/uncopyable.h | 4 +- include/etl/unordered_map.h | 559 +- include/etl/unordered_multimap.h | 389 +- include/etl/unordered_multiset.h | 364 +- include/etl/unordered_set.h | 405 +- include/etl/user_type.h | 169 +- include/etl/utility.h | 502 +- include/etl/variance.h | 32 +- include/etl/variant.h | 2 +- include/etl/variant_pool.h | 350 +- include/etl/vector.h | 427 +- include/etl/version.h | 47 +- include/etl/visitor.h | 243 +- include/etl/wstring.h | 336 +- include/etl/wstring_stream.h | 8 +- library.json | 2 +- library.properties | 2 +- meson_options.txt | 1 + scripts/clang-format-wrapper | 48 + scripts/convert_headers_to_use_guards.bat | 1 + scripts/convert_headers_to_use_once.bat | 1 + scripts/generator_test.py | 11 +- scripts/run-docker.sh | 18 + scripts/update_release.bat | 2 +- scripts/update_release.py | 47 +- scripts/update_version.bat | 2 +- scripts/update_version.py | 25 + support/Release notes.txt | 496 +- test/BUILD.bazel | 36 + test/CMakeLists.txt | 91 +- test/UnitTest++/BUILD.bazel | 20 + test/UnitTest++/Checks.h | 4 +- test/data.h | 90 +- .../assert_function/CMakeLists.txt | 22 +- .../assert_function/assert_function.cpp | 1 - .../assert_function/test_error_handler.cpp | 7 +- .../exceptions/CMakeLists.txt | 22 +- .../exceptions/test_error_handler.cpp | 5 +- .../log_errors/CMakeLists.txt | 28 +- .../log_errors/test_error_handler.cpp | 29 +- .../log_errors_and_exceptions/CMakeLists.txt | 26 +- .../test_error_handler.cpp | 23 +- test/etl_initializer_list/CMakeLists.txt | 22 +- .../test_initializer_list.cpp | 49 +- test/etl_profile.h | 17 +- test/iterators_for_unit_tests.h | 46 +- test/main.cpp | 82 +- test/maincpp03check.cpp | 6 +- test/meson.build | 163 +- test/murmurhash3.cpp | 272 +- test/murmurhash3.h | 19 +- test/run-clang-tidy.sh | 29 + test/run-coverage.sh | 82 + test/run-syntax-checks.sh | 1485 +- test/run-tests.sh | 597 +- test/syntax_check/BUILD.bazel | 18 + test/syntax_check/CMakeLists.txt | 70 +- .../callback_timer_deferred_locked.h.t.cpp | 29 + test/syntax_check/closure.h.t.cpp | 29 + test/syntax_check/concepts.h.t.cpp | 28 + test/syntax_check/const_map.h.t.cpp | 29 + test/syntax_check/const_multimap.h.t.cpp | 29 + test/syntax_check/const_multiset.h.t.cpp | 29 + test/syntax_check/const_set.h.t.cpp | 29 + test/syntax_check/crc16_opensafety_a.h.t.cpp | 29 + test/syntax_check/crc16_opensafety_b.h.t.cpp | 29 + test/syntax_check/crc64_iso.h.t.cpp | 29 + test/syntax_check/crc8_nrsc5.h.t.cpp | 29 + test/syntax_check/crc8_opensafety.h.t.cpp | 29 + test/syntax_check/delegate_observable.h.t.cpp | 28 + test/syntax_check/etl_profile.h | 9 +- test/syntax_check/format.h.t.cpp | 29 + test/syntax_check/index_of_type.h.t.cpp | 29 + test/syntax_check/infinite_loop.h.t.cpp | 29 + test/syntax_check/initializer_list.h.t.cpp | 1 - test/syntax_check/inplace_function.h.t.cpp | 29 + test/syntax_check/intrusive_avl_tree.h.t.cpp | 29 + test/syntax_check/invoke.h.t.cpp | 29 + test/syntax_check/manchester.h.t.cpp | 29 + test/syntax_check/not_null.h.t.cpp | 29 + test/syntax_check/print.h.t.cpp | 29 + test/syntax_check/ranges.h.t.cpp | 29 + .../rounded_integral_division.h.t.cpp | 29 + test/syntax_check/signal.h.t.cpp | 29 + test/syntax_check/type_list.h.t.cpp | 29 + test/test.sh | 179 - test/test_algorithm.cpp | 16039 +++++++++++++++- test/test_alignment.cpp | 151 +- test/test_array.cpp | 294 +- test/test_array_view.cpp | 214 +- test/test_array_wrapper.cpp | 160 +- test/test_atomic.cpp | 345 +- test/test_base64_RFC2152_decoder.cpp | 161 +- test/test_base64_RFC2152_encoder.cpp | 612 +- test/test_base64_RFC3501_decoder.cpp | 154 +- test/test_base64_RFC3501_encoder.cpp | 100 +- ...64_RFC4648_URL_decoder_with_no_padding.cpp | 166 +- ...ase64_RFC4648_URL_decoder_with_padding.cpp | 417 +- ...64_RFC4648_URL_encoder_with_no_padding.cpp | 100 +- ...ase64_RFC4648_URL_encoder_with_padding.cpp | 358 +- ...base64_RFC4648_decoder_with_no_padding.cpp | 168 +- ...st_base64_RFC4648_decoder_with_padding.cpp | 424 +- ...base64_RFC4648_encoder_with_no_padding.cpp | 100 +- ...st_base64_RFC4648_encoder_with_padding.cpp | 358 +- test/test_binary.cpp | 479 +- test/test_bip_buffer_spsc_atomic.cpp | 230 +- test/test_bit.cpp | 96 +- test/test_bit_stream.cpp | 222 +- test/test_bit_stream_reader_big_endian.cpp | 361 +- test/test_bit_stream_reader_little_endian.cpp | 229 +- test/test_bit_stream_writer_big_endian.cpp | 175 +- test/test_bit_stream_writer_little_endian.cpp | 193 +- test/test_bitset_legacy.cpp | 163 +- test/test_bitset_new_comparisons.cpp | 54 +- test/test_bitset_new_default_element_type.cpp | 294 +- ...itset_new_explicit_single_element_type.cpp | 683 +- ...st_bitset_new_ext_default_element_type.cpp | 589 +- ...t_new_ext_explicit_single_element_type.cpp | 887 +- test/test_bloom_filter.cpp | 24 +- test/test_bresenham_line.cpp | 156 +- test/test_bsd_checksum.cpp | 34 +- test/test_buffer_descriptors.cpp | 55 +- test/test_byte.cpp | 7 +- test/test_byte_stream.cpp | 321 +- test/test_callback_service.cpp | 34 +- test/test_callback_timer.cpp | 232 +- test/test_callback_timer_atomic.cpp | 240 +- test/test_callback_timer_deferred_locked.cpp | 1276 ++ test/test_callback_timer_interrupt.cpp | 242 +- test/test_callback_timer_locked.cpp | 247 +- test/test_char_traits.cpp | 106 +- test/test_checksum.cpp | 21 +- test/test_chrono_clocks.cpp | 24 +- test/test_chrono_day.cpp | 93 +- test/test_chrono_duration.cpp | 304 +- test/test_chrono_hh_mm_ss.cpp | 33 +- test/test_chrono_literals.cpp | 42 +- test/test_chrono_month.cpp | 107 +- test/test_chrono_month_day.cpp | 47 +- test/test_chrono_month_day_last.cpp | 14 +- test/test_chrono_month_weekday.cpp | 19 +- test/test_chrono_month_weekday_last.cpp | 23 +- test/test_chrono_operators.cpp | 151 +- test/test_chrono_time_point.cpp | 72 +- test/test_chrono_weekday.cpp | 54 +- test/test_chrono_weekday_indexed.cpp | 70 +- test/test_chrono_weekday_last.cpp | 27 +- test/test_chrono_year.cpp | 76 +- test/test_chrono_year_month.cpp | 85 +- test/test_chrono_year_month_day.cpp | 66 +- test/test_chrono_year_month_day_last.cpp | 58 +- test/test_chrono_year_month_weekday.cpp | 54 +- test/test_chrono_year_month_weekday_last.cpp | 28 +- test/test_circular_buffer.cpp | 437 +- test/test_circular_buffer_external_buffer.cpp | 429 +- test/test_circular_iterator.cpp | 230 +- test/test_closure_with_default_delegate.cpp | 192 + ...losure_with_default_delegate_constexpr.cpp | 164 + test/test_closure_with_inplace_function.cpp | 208 + test/test_compare.cpp | 40 +- test/test_concepts.cpp | 382 + test/test_const_map.cpp | 1666 ++ test/test_const_map_constexpr.cpp | 1671 ++ test/test_const_map_ext.cpp | 1800 ++ test/test_const_map_ext_constexpr.cpp | 1804 ++ test/test_const_multimap.cpp | 1406 ++ test/test_const_multimap_constexpr.cpp | 1339 ++ test/test_const_multimap_ext.cpp | 1604 ++ test/test_const_multimap_ext_constexpr.cpp | 1599 ++ test/test_const_multiset.cpp | 1276 ++ test/test_const_multiset_constexpr.cpp | 1292 ++ test/test_const_multiset_ext.cpp | 1350 ++ test/test_const_multiset_ext_constexpr.cpp | 1358 ++ test/test_const_set.cpp | 1383 ++ test/test_const_set_constexpr.cpp | 1399 ++ test/test_const_set_ext.cpp | 1493 ++ test/test_const_set_ext_constexpr.cpp | 1501 ++ test/test_constant.cpp | 8 +- test/test_container.cpp | 52 +- test/test_correlation.cpp | 49 +- test/test_covariance.cpp | 49 +- test/test_crc1.cpp | 25 +- test/test_crc16.cpp | 64 +- test/test_crc16_a.cpp | 68 +- test/test_crc16_arc.cpp | 68 +- test/test_crc16_aug_ccitt.cpp | 68 +- test/test_crc16_buypass.cpp | 68 +- test/test_crc16_ccitt.cpp | 68 +- test/test_crc16_cdma2000.cpp | 68 +- test/test_crc16_dds110.cpp | 68 +- test/test_crc16_dectr.cpp | 68 +- test/test_crc16_dectx.cpp | 68 +- test/test_crc16_dnp.cpp | 68 +- test/test_crc16_en13757.cpp | 68 +- test/test_crc16_genibus.cpp | 68 +- test/test_crc16_kermit.cpp | 68 +- test/test_crc16_m17.cpp | 68 +- test/test_crc16_maxim.cpp | 68 +- test/test_crc16_mcrf4xx.cpp | 68 +- test/test_crc16_modbus.cpp | 68 +- test/test_crc16_opensafety_a.cpp | 320 + test/test_crc16_opensafety_b.cpp | 320 + test/test_crc16_profibus.cpp | 68 +- test/test_crc16_riello.cpp | 68 +- test/test_crc16_t10dif.cpp | 68 +- test/test_crc16_teledisk.cpp | 68 +- test/test_crc16_tms37157.cpp | 68 +- test/test_crc16_usb.cpp | 68 +- test/test_crc16_x25.cpp | 68 +- test/test_crc16_xmodem.cpp | 68 +- test/test_crc32.cpp | 64 +- test/test_crc32_bzip2.cpp | 68 +- test/test_crc32_c.cpp | 68 +- test/test_crc32_d.cpp | 68 +- test/test_crc32_jamcrc.cpp | 68 +- test/test_crc32_mpeg2.cpp | 68 +- test/test_crc32_posix.cpp | 68 +- test/test_crc32_q.cpp | 68 +- test/test_crc32_xfer.cpp | 68 +- test/test_crc64_ecma.cpp | 68 +- test/test_crc64_iso.cpp | 320 + test/test_crc8_ccitt.cpp | 68 +- test/test_crc8_cdma2000.cpp | 68 +- test/test_crc8_darc.cpp | 68 +- test/test_crc8_dvbs2.cpp | 68 +- test/test_crc8_ebu.cpp | 68 +- test/test_crc8_icode.cpp | 68 +- test/test_crc8_itu.cpp | 68 +- test/test_crc8_j1850.cpp | 71 +- test/test_crc8_j1850_zero.cpp | 71 +- test/test_crc8_maxim.cpp | 68 +- test/test_crc8_nrsc5.cpp | 321 + test/test_crc8_opensafety.cpp | 320 + test/test_crc8_rohc.cpp | 68 +- test/test_crc8_wcdma.cpp | 68 +- test/test_cyclic_value.cpp | 44 +- test/test_debounce.cpp | 114 +- test/test_delegate.cpp | 740 +- test/test_delegate_cpp03.cpp | 73 +- test/test_delegate_observable.cpp | 278 + test/test_delegate_service.cpp | 24 +- test/test_delegate_service_compile_time.cpp | 39 +- test/test_delegate_service_cpp03.cpp | 24 +- test/test_deque.cpp | 538 +- test/test_endian.cpp | 34 +- test/test_enum_type.cpp | 18 +- test/test_error_handler.cpp | 8 +- test/test_etl_assert.cpp | 73 + test/test_etl_traits.cpp | 117 +- test/test_exception.cpp | 26 +- test/test_expected.cpp | 1037 +- test/test_fixed_iterator.cpp | 67 +- ...est_fixed_sized_memory_block_allocator.cpp | 90 +- test/test_flags.cpp | 169 +- test/test_flat_map.cpp | 419 +- test/test_flat_multimap.cpp | 306 +- test/test_flat_multiset.cpp | 251 +- test/test_flat_set.cpp | 308 +- test/test_fnv_1.cpp | 72 +- test/test_format.cpp | 996 + test/test_format_spec.cpp | 133 +- test/test_forward_list.cpp | 212 +- test/test_forward_list_shared_pool.cpp | 360 +- test/test_fsm.cpp | 175 +- test/test_function.cpp | 46 +- test/test_function_traits.cpp | 402 +- test/test_functional.cpp | 288 +- test/test_gamma.cpp | 70 +- test/test_hash.cpp | 144 +- test/test_hfsm.cpp | 136 +- ...t_hfsm_recurse_to_inner_state_on_start.cpp | 26 +- test/test_hfsm_transition_on_enter.cpp | 390 + test/test_histogram.cpp | 176 +- test/test_index_of_type.cpp | 18 +- test/test_indirect_vector.cpp | 584 +- test/test_indirect_vector_external_buffer.cpp | 516 +- test/test_inplace_function.cpp | 1833 ++ test/test_instance_count.cpp | 22 +- test/test_integral_limits.cpp | 86 +- test/test_intrusive_avl_tree.cpp | 1606 ++ test/test_intrusive_forward_list.cpp | 162 +- test/test_intrusive_links.cpp | 734 +- test/test_intrusive_list.cpp | 209 +- test/test_intrusive_queue.cpp | 75 +- test/test_intrusive_stack.cpp | 41 +- test/test_invert.cpp | 48 +- test/test_invoke.cpp | 753 + test/test_io_port.cpp | 61 +- test/test_is_invocable.cpp | 1311 ++ test/test_iterator.cpp | 943 +- test/test_jenkins.cpp | 26 +- test/test_largest.cpp | 112 +- test/test_limiter.cpp | 28 +- test/test_limits.cpp | 1050 +- test/test_list.cpp | 327 +- test/test_list_shared_pool.cpp | 355 +- test/test_macros.cpp | 23 +- test/test_make_string.cpp | 39 +- test/test_manchester.cpp | 477 + test/test_map.cpp | 643 +- test/test_math.cpp | 60 +- test/test_math_functions.cpp | 277 +- test/test_mean.cpp | 19 +- test/test_mem_cast.cpp | 128 +- test/test_mem_cast_ptr.cpp | 156 +- test/test_memory.cpp | 1780 +- test/test_message.cpp | 90 +- test/test_message_broker.cpp | 76 +- test/test_message_bus.cpp | 58 +- test/test_message_packet.cpp | 94 +- test/test_message_router.cpp | 228 +- test/test_message_router_registry.cpp | 98 +- test/test_message_timer.cpp | 155 +- test/test_message_timer_atomic.cpp | 211 +- test/test_message_timer_interrupt.cpp | 203 +- test/test_message_timer_locked.cpp | 159 +- test/test_multi_array.cpp | 155 +- test/test_multi_range.cpp | 147 +- test/test_multi_span.cpp | 364 +- test/test_multi_vector.cpp | 214 +- test/test_multimap.cpp | 570 +- test/test_multiset.cpp | 579 +- test/test_murmur3.cpp | 40 +- test/test_not_null_pointer.cpp | 164 + test/test_not_null_pointer_constexpr.cpp | 154 + test/test_not_null_unique_pointer.cpp | 120 + test/test_nth_type.cpp | 13 +- test/test_numeric.cpp | 494 +- test/test_observer.cpp | 188 +- test/test_optional.cpp | 791 +- test/test_overload.cpp | 63 +- test/test_packet.cpp | 33 +- test/test_parameter_pack.cpp | 25 +- test/test_parameter_type.cpp | 10 +- test/test_parity_checksum.cpp | 21 +- test/test_pearson.cpp | 64 +- test/test_poly_span_dynamic_extent.cpp | 147 +- test/test_poly_span_fixed_extent.cpp | 141 +- test/test_pool.cpp | 830 +- test/test_pool_external_buffer.cpp | 109 +- test/test_print.cpp | 84 + test/test_priority_queue.cpp | 130 +- test/test_pseudo_moving_average.cpp | 34 +- test/test_quantize.cpp | 57 +- test/test_queue.cpp | 58 +- test/test_queue_lockable.cpp | 56 +- test/test_queue_lockable_small.cpp | 37 +- test/test_queue_memory_model_small.cpp | 30 +- test/test_queue_mpmc_mutex.cpp | 82 +- test/test_queue_mpmc_mutex_small.cpp | 75 +- test/test_queue_spsc_atomic.cpp | 47 +- test/test_queue_spsc_atomic_small.cpp | 47 +- test/test_queue_spsc_isr.cpp | 42 +- test/test_queue_spsc_isr_small.cpp | 19 +- test/test_queue_spsc_locked.cpp | 42 +- test/test_queue_spsc_locked_small.cpp | 35 +- test/test_random.cpp | 267 +- test/test_ranges.cpp | 6407 ++++++ test/test_ratio.cpp | 7 +- test/test_reference_flat_map.cpp | 277 +- test/test_reference_flat_multimap.cpp | 220 +- test/test_reference_flat_multiset.cpp | 198 +- test/test_reference_flat_set.cpp | 199 +- test/test_rescale.cpp | 33 +- test/test_result.cpp | 88 +- test/test_rms.cpp | 22 +- test/test_rounded_integral_division.cpp | 912 + test/test_scaled_rounding.cpp | 1192 +- test/test_set.cpp | 703 +- test/test_shared_message.cpp | 165 +- test/test_signal.cpp | 741 + test/test_singleton.cpp | 5 +- test/test_singleton_base.cpp | 7 +- test/test_smallest.cpp | 63 +- test/test_span_dynamic_extent.cpp | 711 +- test/test_span_fixed_extent.cpp | 534 +- test/test_stack.cpp | 48 +- test/test_standard_deviation.cpp | 19 +- test/test_state_chart.cpp | 52 +- test/test_state_chart_compile_time.cpp | 86 +- ...chart_compile_time_with_data_parameter.cpp | 66 +- test/test_state_chart_with_data_parameter.cpp | 61 +- ...state_chart_with_rvalue_data_parameter.cpp | 60 +- test/test_string_char.cpp | 897 +- test/test_string_char_external_buffer.cpp | 1229 +- test/test_string_stream.cpp | 42 +- test/test_string_stream_u16.cpp | 42 +- test/test_string_stream_u32.cpp | 42 +- test/test_string_stream_u8.cpp | 53 +- test/test_string_stream_wchar_t.cpp | 36 +- test/test_string_u16.cpp | 860 +- test/test_string_u16_external_buffer.cpp | 1283 +- test/test_string_u32.cpp | 860 +- test/test_string_u32_external_buffer.cpp | 1279 +- test/test_string_u8.cpp | 1668 +- test/test_string_u8_external_buffer.cpp | 1877 +- test/test_string_utilities.cpp | 145 +- test/test_string_utilities_std.cpp | 100 +- test/test_string_utilities_std_u16.cpp | 113 +- test/test_string_utilities_std_u32.cpp | 101 +- test/test_string_utilities_std_u8.cpp | 113 +- test/test_string_utilities_std_wchar_t.cpp | 101 +- test/test_string_utilities_u16.cpp | 79 +- test/test_string_utilities_u32.cpp | 79 +- test/test_string_utilities_u8.cpp | 99 +- test/test_string_utilities_wchar_t.cpp | 137 +- test/test_string_view.cpp | 285 +- test/test_string_wchar_t.cpp | 862 +- test/test_string_wchar_t_external_buffer.cpp | 1283 +- test/test_successor.cpp | 13 +- test/test_task_scheduler.cpp | 66 +- test/test_threshold.cpp | 51 +- test/test_to_arithmetic.cpp | 56 +- test/test_to_arithmetic_u16.cpp | 51 +- test/test_to_arithmetic_u32.cpp | 51 +- test/test_to_arithmetic_u8.cpp | 59 +- test/test_to_arithmetic_wchar_t.cpp | 51 +- test/test_to_string.cpp | 346 +- test/test_to_u16string.cpp | 323 +- test/test_to_u32string.cpp | 324 +- test/test_to_u8string.cpp | 180 +- test/test_to_wstring.cpp | 333 +- test/test_tuple.cpp | 340 +- test/test_type_def.cpp | 55 +- test/test_type_list.cpp | 1087 +- test/test_type_lookup.cpp | 352 +- test/test_type_select.cpp | 67 +- test/test_type_traits.cpp | 2505 ++- test/test_unaligned_type.cpp | 331 +- test/test_unaligned_type_ext.cpp | 332 +- test/test_uncopyable.cpp | 8 +- test/test_unordered_map.cpp | 283 +- test/test_unordered_multimap.cpp | 217 +- test/test_unordered_multiset.cpp | 134 +- test/test_unordered_set.cpp | 207 +- test/test_user_type.cpp | 33 +- test/test_utility.cpp | 513 +- test/test_variance.cpp | 19 +- test/test_variant_legacy.cpp | 235 +- test/test_variant_pool.cpp | 31 +- test/test_variant_pool_external_buffer.cpp | 42 +- test/test_variant_variadic.cpp | 1039 +- test/test_vector.cpp | 611 +- test/test_vector_external_buffer.cpp | 454 +- test/test_vector_non_trivial.cpp | 549 +- test/test_vector_pointer.cpp | 699 +- test/test_vector_pointer_external_buffer.cpp | 639 +- test/test_visitor.cpp | 180 +- test/test_xor_checksum.cpp | 21 +- test/test_xor_rotate_checksum.cpp | 30 +- test/unit_test_framework.h | 2 + test/vs2019/.gitignore | 7 - test/vs2019/NatvisFile.natvis | 3 - test/vs2019/cpp.hint | 53 - test/vs2019/etl.sln | 157 - test/vs2019/etl.vcxproj | 13586 ------------- test/vs2019/etl.vcxproj.filters | 3605 ---- .../etl_initialiser_list.vcxproj.filters | 22 - test/vs2022/cpp.hint | 22 + test/vs2022/delegate.natvis | 19 + test/vs2022/etl.sln | 24 + test/vs2022/etl.vcxproj | 1996 +- test/vs2022/etl.vcxproj.filters | 397 +- version.txt | 2 +- zephyr/CMakeLists.txt | 10 +- zephyr/Kconfig | 14 + zephyr/module.yml | 5 +- 1340 files changed, 248192 insertions(+), 87699 deletions(-) create mode 100644 .bazelrc create mode 100644 .bazelversion create mode 100644 .clang-tidy create mode 100644 .coderabbit.yaml create mode 100644 .devcontainer/armhf/Dockerfile create mode 100644 .devcontainer/armhf/devcontainer.json create mode 100644 .devcontainer/armhf/toolchain-armhf.cmake create mode 100644 .devcontainer/clang21/devcontainer.json delete mode 100644 .devcontainer/context/reinstall-cmake.sh create mode 100644 .devcontainer/i386/Dockerfile create mode 100644 .devcontainer/i386/devcontainer.json create mode 100644 .devcontainer/i386/toolchain-i386.cmake create mode 100644 .devcontainer/powerpc/Dockerfile create mode 100644 .devcontainer/powerpc/devcontainer.json create mode 100644 .devcontainer/powerpc/toolchain-powerpc.cmake create mode 100644 .devcontainer/riscv64/Dockerfile create mode 100644 .devcontainer/riscv64/devcontainer.json create mode 100644 .devcontainer/riscv64/toolchain-riscv64.cmake create mode 100755 .devcontainer/run-tests.sh create mode 100644 .devcontainer/s390x/Dockerfile create mode 100644 .devcontainer/s390x/devcontainer.json create mode 100644 .devcontainer/s390x/toolchain-s390x.cmake create mode 100644 .devcontainer/ubuntu-26.04/Dockerfile create mode 100644 .github/workflows/bazel-gcc-c++23-no-stl.yml create mode 100644 .github/workflows/clang-c++26.yml create mode 100644 .github/workflows/clang-format.yaml create mode 100644 .github/workflows/clang-format_update.yaml create mode 100644 .github/workflows/clang-tidy.yaml create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/deploy-etl-documentation.yml create mode 100644 .github/workflows/gcc-c++23-armhf.yml create mode 100644 .github/workflows/gcc-c++23-i386.yml create mode 100644 .github/workflows/gcc-c++23-powerpc.yml create mode 100644 .github/workflows/gcc-c++23-riscv64.yml create mode 100644 .github/workflows/gcc-c++23-s390x.yml create mode 100644 .github/workflows/gcc-c++26.yml create mode 100644 .github/workflows/generator.yml create mode 100644 .github/workflows/meson-gcc-c++23-no-stl.yml create mode 100644 .github/workflows/platformio-update.yml create mode 100644 .gitmodules create mode 100644 .treefmt.toml create mode 100644 BUILD.bazel create mode 100644 Converting header guards.txt create mode 100644 DOCUMENTATION.md create mode 100644 MODULE.bazel create mode 100644 MODULE.bazel.lock create mode 100644 docs/IO/_index.md create mode 100644 docs/IO/bip_buffer_spsc_atomic.md create mode 100644 docs/IO/buffer_descriptors.md create mode 100644 docs/IO/debounce.md create mode 100644 docs/IO/debounce.png create mode 100644 docs/IO/io_port.md create mode 100644 docs/Is the ETL free.md create mode 100644 docs/_index.md create mode 100644 docs/about.md create mode 100644 docs/binary/_index.md create mode 100644 docs/binary/binary.md create mode 100644 docs/binary/bit.md create mode 100644 docs/binary/byte.md create mode 100644 docs/binary/flags.md create mode 100644 docs/blog/_index.md create mode 100644 docs/blog/graphics/Reflection1.png create mode 100644 docs/blog/graphics/_index.md create mode 100644 docs/blog/graphics/applications-of-dot-and-cross-products.md create mode 100644 docs/blog/graphics/determining-line-line-intersections.md create mode 100644 docs/blog/graphics/dot-and-cross-products.md create mode 100644 docs/blog/graphics/images/DotCross1.png create mode 100644 docs/blog/graphics/images/DotCross3.png create mode 100644 docs/blog/graphics/images/DotCross4.png create mode 100644 docs/blog/graphics/images/DotCrossCoordinates.png create mode 100644 docs/blog/graphics/images/LineCross1.png create mode 100644 docs/blog/graphics/images/LineCross2.png create mode 100644 docs/blog/graphics/images/Reflection1.png create mode 100644 docs/blog/graphics/images/ScanRectangle1.png create mode 100644 docs/blog/graphics/images/ScanRectangle2.png create mode 100644 docs/blog/graphics/images/ScanRectangle3.png create mode 100644 docs/blog/graphics/images/ScanRectangle4.png create mode 100644 docs/blog/graphics/images/ScanRectangle5.png create mode 100644 docs/blog/graphics/images/ScanRectangle6.png create mode 100644 docs/blog/graphics/scanning-an-arbitrarily-rotated-rectangular-region.md create mode 100644 docs/blog/implementing-a-low-cost-moving-average.md create mode 100644 docs/callbacks/_index.md create mode 100644 docs/callbacks/callback-service.md create mode 100644 docs/callbacks/closure.md create mode 100644 docs/callbacks/delegate-service.md create mode 100644 docs/callbacks/delegate-vs-inplace_function.md create mode 100644 docs/callbacks/delegate.md create mode 100644 docs/callbacks/delegate_observable.md create mode 100644 docs/callbacks/function.md create mode 100644 docs/callbacks/inplace_function.md create mode 100644 docs/callbacks/signal.md create mode 100644 docs/chrono/_index.md create mode 100644 docs/chrono/chrono-literals.md create mode 100644 docs/chrono/clocks.md create mode 100644 docs/chrono/day.md create mode 100644 docs/chrono/duration/_index.md create mode 100644 docs/chrono/duration/duration.md create mode 100644 docs/chrono/duration/duration_cast.md create mode 100644 docs/chrono/duration/duration_values.md create mode 100644 docs/chrono/hh_mm_ss.md create mode 100644 docs/chrono/last_spec.md create mode 100644 docs/chrono/month/_index.md create mode 100644 docs/chrono/month/month.md create mode 100644 docs/chrono/month/month_day.md create mode 100644 docs/chrono/month/month_day_last.md create mode 100644 docs/chrono/month/month_weekday.md create mode 100644 docs/chrono/month/month_weekday_last.md create mode 100644 docs/chrono/operators.md create mode 100644 docs/chrono/time_point.md create mode 100644 docs/chrono/weekday/_index.md create mode 100644 docs/chrono/weekday/weekday.md create mode 100644 docs/chrono/weekday/weekday_indexed.md create mode 100644 docs/chrono/weekday/weekday_last.md create mode 100644 docs/chrono/year/_index.md create mode 100644 docs/chrono/year/year.md create mode 100644 docs/chrono/year/year_month.md create mode 100644 docs/chrono/year/year_month_day.md create mode 100644 docs/chrono/year/year_month_day_last.md create mode 100644 docs/codecs/_index.md create mode 100644 docs/codecs/base64.md create mode 100644 docs/codecs/manchester.md create mode 100644 docs/containers/Views/_index.md create mode 100644 docs/containers/Views/array-view.md create mode 100644 docs/containers/Views/array-wrapper.md create mode 100644 docs/containers/Views/multi-range.md create mode 100644 docs/containers/Views/multi-span.md create mode 100644 docs/containers/Views/poly-span.md create mode 100644 docs/containers/Views/span.md create mode 100644 docs/containers/_index.md create mode 100644 docs/containers/arrays/_index.md create mode 100644 docs/containers/arrays/array.md create mode 100644 docs/containers/arrays/multi-array.md create mode 100644 docs/containers/binary/_index.md create mode 100644 docs/containers/binary/bitset.md create mode 100644 docs/containers/binary/bloom-filter.md create mode 100644 docs/containers/lists/_index.md create mode 100644 docs/containers/lists/forward-list.md create mode 100644 docs/containers/lists/intrusive-forward-list.md create mode 100644 docs/containers/lists/intrusive-list.md create mode 100644 docs/containers/lists/list.md create mode 100644 docs/containers/maps/_index.md create mode 100644 docs/containers/maps/const-map.md create mode 100644 docs/containers/maps/const-multimap.md create mode 100644 docs/containers/maps/flat-map.md create mode 100644 docs/containers/maps/flat-multimap.md create mode 100644 docs/containers/maps/map.md create mode 100644 docs/containers/maps/multimap.md create mode 100644 docs/containers/maps/reference-flat-map.md create mode 100644 docs/containers/maps/reference-flat-multimap.md create mode 100644 docs/containers/maps/unordered-map.md create mode 100644 docs/containers/maps/unordered-multimap.md create mode 100644 docs/containers/memory/_index.md create mode 100644 docs/containers/memory/fixed-sized-memory-block-allocator.md create mode 100644 docs/containers/memory/imemory-block-allocator.md create mode 100644 docs/containers/pools/_index.md create mode 100644 docs/containers/pools/generic-pool.md create mode 100644 docs/containers/pools/ipool.md create mode 100644 docs/containers/pools/pool.md create mode 100644 docs/containers/pools/variant-pool.md create mode 100644 docs/containers/queues & stacks/_index.md create mode 100644 docs/containers/queues & stacks/circular-buffer.md create mode 100644 docs/containers/queues & stacks/deque.md create mode 100644 docs/containers/queues & stacks/priority-queue.md create mode 100644 docs/containers/queues & stacks/queue-lockable.md create mode 100644 docs/containers/queues & stacks/queue-mpmc-mutex.md create mode 100644 docs/containers/queues & stacks/queue-spsc-atomic.md create mode 100644 docs/containers/queues & stacks/queue-spsc-isr.md create mode 100644 docs/containers/queues & stacks/queue-spsc-locked.md create mode 100644 docs/containers/queues & stacks/queue.md create mode 100644 docs/containers/queues & stacks/stack.md create mode 100644 docs/containers/sets/_index.md create mode 100644 docs/containers/sets/const-multiset.md create mode 100644 docs/containers/sets/const-set.md create mode 100644 docs/containers/sets/flat-multiset.md create mode 100644 docs/containers/sets/flat-set.md create mode 100644 docs/containers/sets/multiset.md create mode 100644 docs/containers/sets/reference-flat-multiset.md create mode 100644 docs/containers/sets/reference-flat-set.md create mode 100644 docs/containers/sets/set.md create mode 100644 docs/containers/variadics/_index.md create mode 100644 docs/containers/variadics/packet.md create mode 100644 docs/containers/variadics/tuple.md create mode 100644 docs/containers/variadics/variant-legacy.md create mode 100644 docs/containers/variadics/variant-variadic.md create mode 100644 docs/containers/vectors/_index.md create mode 100644 docs/containers/vectors/indirect-vector.md create mode 100644 docs/containers/vectors/multi-vector.md create mode 100644 docs/containers/vectors/vector.md create mode 100644 docs/getting-started/ETL-logos-icons-and-graphics.md create mode 100644 docs/getting-started/_index.md create mode 100644 docs/getting-started/arduino.md create mode 100644 docs/getting-started/compilers.md create mode 100644 docs/getting-started/contribute.md create mode 100644 docs/getting-started/enabling-compiler-built-ins.md create mode 100644 docs/getting-started/generators.md create mode 100644 docs/getting-started/header-guards.md create mode 100644 docs/getting-started/interfacing-with-c.md create mode 100644 docs/getting-started/macros.md create mode 100644 docs/getting-started/no-stl.md create mode 100644 docs/getting-started/setup.md create mode 100644 docs/getting-started/view-the-docs-locally/_index.md create mode 100644 docs/getting-started/view-the-docs-locally/hugo-commands.md create mode 100644 docs/getting-started/view-the-docs-locally/install-hugo.md create mode 100644 docs/getting-started/view-the-docs-locally/markdown.md create mode 100644 docs/getting-started/view-the-docs-locally/view-the-docs.md create mode 100644 docs/iterators/Iterator.md create mode 100644 docs/iterators/_index.md create mode 100644 docs/iterators/circular_iterator.md create mode 100644 docs/iterators/fixed_iterator.md create mode 100644 docs/maths/_index.md create mode 100644 docs/maths/absolute.md create mode 100644 docs/maths/checksums-hashes.md create mode 100644 docs/maths/comb-perm.md create mode 100644 docs/maths/constants.md create mode 100644 docs/maths/correlation.md create mode 100644 docs/maths/covariance.md create mode 100644 docs/maths/gamma.md create mode 100644 docs/maths/histogram.md create mode 100644 docs/maths/invert.md create mode 100644 docs/maths/is_negative.md create mode 100644 docs/maths/limiter.md create mode 100644 docs/maths/mean.md create mode 100644 docs/maths/pseudo_moving_average.md create mode 100644 docs/maths/quantize.md create mode 100644 docs/maths/radix.md create mode 100644 docs/maths/random.md create mode 100644 docs/maths/ratio.md create mode 100644 docs/maths/rescale.md create mode 100644 docs/maths/rms.md create mode 100644 docs/maths/rounded-integral-division.md create mode 100644 docs/maths/scaled-rounding.md create mode 100644 docs/maths/standard_deviation.md create mode 100644 docs/maths/threshold.md create mode 100644 docs/maths/variance.md create mode 100644 docs/messaging/_index.md create mode 100644 docs/messaging/images/message-framework.png create mode 100644 docs/messaging/message-broker.md create mode 100644 docs/messaging/message-bus.md create mode 100644 docs/messaging/message-packet.md create mode 100644 docs/messaging/message-router-registry.md create mode 100644 docs/messaging/message-router.md create mode 100644 docs/messaging/message.md create mode 100644 docs/messaging/reference-counted-message-pool.md create mode 100644 docs/messaging/reference-counted-messages.md create mode 100644 docs/messaging/shared-message.md create mode 100644 docs/multi-tasking/_index.md create mode 100644 docs/multi-tasking/cooperative-scheduler.md create mode 100644 docs/multi-tasking/task.md create mode 100644 docs/patterns/_index.md create mode 100644 docs/patterns/observer.md create mode 100644 docs/patterns/overload.md create mode 100644 docs/patterns/singleton-base.md create mode 100644 docs/patterns/singleton.md create mode 100644 docs/patterns/successor.md create mode 100644 docs/patterns/visitor.md create mode 100644 docs/pseudo-containers/_index.md create mode 100644 docs/pseudo-containers/bresenham_line.md create mode 100644 docs/ranges/_index.md create mode 100644 docs/ranges/ranges.md create mode 100644 docs/releases/_index.md create mode 100644 docs/resourses/_index.md create mode 100644 docs/source/_index.md create mode 100644 docs/source/bazel.md create mode 100644 docs/source/docker.md create mode 100644 docs/source/generators.md create mode 100644 docs/source/meson.md create mode 100644 docs/source/source-formatting.md create mode 100644 docs/source/testing.md create mode 100644 docs/state machines/_index.md create mode 100644 docs/state machines/finite-state-machine.md create mode 100644 docs/state machines/hfsm.png create mode 100644 docs/state machines/hierarchical-finite-state-machine.md create mode 100644 docs/state machines/state-chart.md create mode 100644 docs/strings/_index.md create mode 100644 docs/strings/basic-format-spec.md create mode 100644 docs/strings/format.md create mode 100644 docs/strings/string-stream.md create mode 100644 docs/strings/string-view.md create mode 100644 docs/strings/string.md create mode 100644 docs/strings/string_utilities.md create mode 100644 docs/strings/to-arithmetic.md create mode 100644 docs/strings/to-string.md create mode 100644 docs/timers/_index.md create mode 100644 docs/timers/callback-timer-atomic.md create mode 100644 docs/timers/callback-timer-deferred-locked.md create mode 100644 docs/timers/callback-timer-interrupt.md create mode 100644 docs/timers/callback-timer-locked.md create mode 100644 docs/timers/callback-timer.md create mode 100644 docs/timers/message-timer-atomic.md create mode 100644 docs/timers/message-timer-interrupt.md create mode 100644 docs/timers/message-timer-locked.md create mode 100644 docs/timers/message-timer.md create mode 100644 docs/timers/timer.md create mode 100644 docs/tutorials/_index.md create mode 100644 docs/tutorials/callback-service.md create mode 100644 docs/tutorials/concurrent-queues.md create mode 100644 docs/tutorials/containers-tutorial.md create mode 100644 docs/tutorials/delegate-service.md create mode 100644 docs/tutorials/generators-tutorial.md create mode 100644 docs/tutorials/locked-queues.md create mode 100644 docs/tutorials/message-tutorial.md create mode 100644 docs/tutorials/observer-tutorial.md create mode 100644 docs/tutorials/shared-message_tutorial.md create mode 100644 docs/tutorials/unique_ptr-with-etl-pool.md create mode 100644 docs/tutorials/visitor-tutorial.md create mode 100644 docs/types/_index.md create mode 100644 docs/types/largest.md create mode 100644 docs/types/smallest.md create mode 100644 docs/types/tuple.md create mode 100644 docs/types/type-list.md create mode 100644 docs/types/type-lookup.md create mode 100644 docs/types/type-select.md create mode 100644 docs/types/type-traits.md create mode 100644 docs/types/type_def.md create mode 100644 docs/types/unaligned-type.md create mode 100644 docs/types/user_type.md create mode 100644 docs/utilities/_index.md create mode 100644 docs/utilities/algorithms.md create mode 100644 docs/utilities/alignment.md create mode 100644 docs/utilities/atomic.md create mode 100644 docs/utilities/bit-stream-reader.md create mode 100644 docs/utilities/bit-stream-writer.md create mode 100644 docs/utilities/byte-stream-reader.md create mode 100644 docs/utilities/byte-stream-writer.md create mode 100644 docs/utilities/compare.md create mode 100644 docs/utilities/constant.md create mode 100644 docs/utilities/cyclic-value.md create mode 100644 docs/utilities/debug-count.md create mode 100644 docs/utilities/endian.md create mode 100644 docs/utilities/enum-type.md create mode 100644 docs/utilities/error-handler.md create mode 100644 docs/utilities/etl-traits.md create mode 100644 docs/utilities/exceptions.md create mode 100644 docs/utilities/expected.md create mode 100644 docs/utilities/function-traits.md create mode 100644 docs/utilities/functional.md create mode 100644 docs/utilities/infinite-loop.md create mode 100644 docs/utilities/initializer-list.md create mode 100644 docs/utilities/instance-count.md create mode 100644 docs/utilities/integral-limits.md create mode 100644 docs/utilities/intrusive-links.md create mode 100644 docs/utilities/limits.md create mode 100644 docs/utilities/mem_cast.md create mode 100644 docs/utilities/memory-model.md create mode 100644 docs/utilities/memory.md create mode 100644 docs/utilities/mutex.md create mode 100644 docs/utilities/not-null.md create mode 100644 docs/utilities/nth-type.md create mode 100644 docs/utilities/null-type.md create mode 100644 docs/utilities/nullptr.md create mode 100644 docs/utilities/numeric.md create mode 100644 docs/utilities/optional.md create mode 100644 docs/utilities/parameter-pack.md create mode 100644 docs/utilities/parameter-type.md create mode 100644 docs/utilities/reference-counted-objects.md create mode 100644 docs/utilities/result.md create mode 100644 docs/utilities/static-assert.md create mode 100644 docs/utilities/type-id.md create mode 100644 docs/utilities/utility.md create mode 100644 docs/utilities/versions.md create mode 100644 examples/UniquePtrWithPool/CmakeLists.txt create mode 100644 examples/UniquePtrWithPool/Main.cpp create mode 100644 examples/UniquePtrWithPool/UniquePtrWithPool.sln rename test/vs2019/etl_initialiser_list/etl_initialiser_list.vcxproj => examples/UniquePtrWithPool/UniquePtrWithPool.vcxproj (79%) create mode 100644 hugo/archetypes/default.md create mode 100644 hugo/assets/css/custom.css create mode 100644 hugo/assets/version.txt create mode 100644 hugo/go.mod create mode 100644 hugo/go.sum create mode 100644 hugo/hugo.toml create mode 100644 hugo/layouts/404.html create mode 100644 hugo/layouts/_default/baseof.html create mode 100644 hugo/layouts/_partials/footer.html create mode 100644 hugo/layouts/_partials/head.html create mode 100644 hugo/layouts/index.html create mode 100644 hugo/layouts/shortcodes/version.html create mode 100644 hugo/static/.htaccess create mode 100644 hugo/static/Linux.png create mode 100644 hugo/static/Windows.png create mode 100644 hugo/static/apple-touch-icon.png create mode 100644 hugo/static/css/syntax-dark.css create mode 100644 hugo/static/css/syntax-light.css create mode 100644 hugo/static/favicon-16x16.png create mode 100644 hugo/static/favicon-32x32.png create mode 100644 hugo/static/favicon.ico create mode 100644 hugo/static/favicon.svg create mode 100644 hugo/static/fonts/roboto-mono-v31-latin-500.woff2 create mode 100644 hugo/static/fonts/roboto-v51-latin-regular.woff2 create mode 100644 hugo/static/images/logo.png create mode 100644 hugo/static/macOS.png create mode 100644 images/QR Github.png create mode 100644 images/apple-touch-icon.png create mode 100644 images/favicon-96.png create mode 100644 images/favicon.svg create mode 100644 images/site.webmanifest create mode 100644 images/web-app-manifest-192x192.png create mode 100644 images/web-app-manifest-512x512.png create mode 100644 include/etl/callback_timer_deferred_locked.h create mode 100644 include/etl/closure.h create mode 100644 include/etl/concepts.h create mode 100644 include/etl/const_map.h create mode 100644 include/etl/const_multimap.h create mode 100644 include/etl/const_multiset.h create mode 100644 include/etl/const_set.h create mode 100644 include/etl/crc16_opensafety_a.h create mode 100644 include/etl/crc16_opensafety_b.h create mode 100644 include/etl/crc64_iso.h create mode 100644 include/etl/crc8_nrsc5.h create mode 100644 include/etl/crc8_opensafety.h create mode 100644 include/etl/delegate_observable.h delete mode 100644 include/etl/delegate_observer.h create mode 100644 include/etl/format.h create mode 100644 include/etl/generators/fsm_cpp03_generator.h create mode 100644 include/etl/generators/fsm_friend_decl_cpp03_generator.h create mode 100644 include/etl/generators/fsm_fwd_decl_cpp03_generator.h delete mode 100644 include/etl/generators/fsm_generator.h create mode 100644 include/etl/generators/largest_alignment_cpp03_generator.h create mode 100644 include/etl/generators/largest_cpp03_generator.h delete mode 100644 include/etl/generators/largest_generator.h create mode 100644 include/etl/generators/largest_type_cpp03_generator.h rename include/etl/generators/{message_packet_generator.h => message_packet_cpp03_generator.h} (71%) create mode 100644 include/etl/generators/message_router_cpp03_generator.h delete mode 100644 include/etl/generators/message_router_generator.h create mode 100644 include/etl/generators/smallest_cpp03_generator.h delete mode 100644 include/etl/generators/smallest_generator.h create mode 100644 include/etl/generators/type_lookup_cpp03_generator.h delete mode 100644 include/etl/generators/type_lookup_generator.h create mode 100644 include/etl/generators/type_select_cpp03_generator.h delete mode 100644 include/etl/generators/type_select_generator.h create mode 100644 include/etl/generators/type_traits_cpp03_generator.h delete mode 100644 include/etl/generators/type_traits_generator.h create mode 100644 include/etl/generators/variant_pool_cpp03_generator.h delete mode 100644 include/etl/generators/variant_pool_generator.h create mode 100644 include/etl/infinite_loop.h create mode 100644 include/etl/inplace_function.h create mode 100644 include/etl/intrusive_avl_tree.h create mode 100644 include/etl/invoke.h create mode 100644 include/etl/manchester.h create mode 100644 include/etl/mutex/mutex_threadx.h create mode 100644 include/etl/not_null.h create mode 100644 include/etl/print.h create mode 100644 include/etl/private/diagnostic_cxx_11_extensions_push.h create mode 100644 include/etl/private/diagnostic_gnu_static_float_init_push.h create mode 100644 include/etl/private/diagnostic_sign_conversion_push.h create mode 100644 include/etl/private/diagnostic_stringop_overflow_push.h create mode 100644 include/etl/private/diagnostic_unnamed_type_template_args_push.h create mode 100644 include/etl/private/fsm_cpp03.h create mode 100644 include/etl/private/fsm_friend_decl_cpp03.h create mode 100644 include/etl/private/fsm_fwd_decl_cpp03.h create mode 100644 include/etl/private/largest_alignment_cpp03.h create mode 100644 include/etl/private/largest_cpp03.h create mode 100644 include/etl/private/largest_type_cpp03.h create mode 100644 include/etl/private/message_packet_cpp03.h create mode 100644 include/etl/private/message_router_cpp03.h create mode 100644 include/etl/private/ranges_mini_variant.h create mode 100644 include/etl/private/smallest_cpp03.h create mode 100644 include/etl/private/type_lookup_cpp03.h create mode 100644 include/etl/private/type_select_cpp03.h create mode 100644 include/etl/private/type_traits_cpp03.h create mode 100644 include/etl/private/variant_pool_cpp03.h create mode 100644 include/etl/profiles/cpp20.h create mode 100644 include/etl/profiles/cpp20_no_stl.h create mode 100644 include/etl/profiles/cpp23.h create mode 100644 include/etl/profiles/cpp23_no_stl.h create mode 100644 include/etl/profiles/cpp26.h create mode 100644 include/etl/profiles/cpp26_no_stl.h create mode 100644 include/etl/ranges.h create mode 100644 include/etl/rounded_integral_division.h create mode 100644 include/etl/signal.h create mode 100755 scripts/clang-format-wrapper create mode 100644 scripts/convert_headers_to_use_guards.bat create mode 100644 scripts/convert_headers_to_use_once.bat create mode 100755 scripts/run-docker.sh create mode 100644 test/BUILD.bazel create mode 100644 test/UnitTest++/BUILD.bazel create mode 100755 test/run-clang-tidy.sh create mode 100755 test/run-coverage.sh mode change 100644 => 100755 test/run-syntax-checks.sh mode change 100644 => 100755 test/run-tests.sh create mode 100644 test/syntax_check/BUILD.bazel create mode 100644 test/syntax_check/callback_timer_deferred_locked.h.t.cpp create mode 100644 test/syntax_check/closure.h.t.cpp create mode 100644 test/syntax_check/concepts.h.t.cpp create mode 100644 test/syntax_check/const_map.h.t.cpp create mode 100644 test/syntax_check/const_multimap.h.t.cpp create mode 100644 test/syntax_check/const_multiset.h.t.cpp create mode 100644 test/syntax_check/const_set.h.t.cpp create mode 100644 test/syntax_check/crc16_opensafety_a.h.t.cpp create mode 100644 test/syntax_check/crc16_opensafety_b.h.t.cpp create mode 100644 test/syntax_check/crc64_iso.h.t.cpp create mode 100644 test/syntax_check/crc8_nrsc5.h.t.cpp create mode 100644 test/syntax_check/crc8_opensafety.h.t.cpp create mode 100644 test/syntax_check/delegate_observable.h.t.cpp create mode 100644 test/syntax_check/format.h.t.cpp create mode 100644 test/syntax_check/index_of_type.h.t.cpp create mode 100644 test/syntax_check/infinite_loop.h.t.cpp create mode 100644 test/syntax_check/inplace_function.h.t.cpp create mode 100644 test/syntax_check/intrusive_avl_tree.h.t.cpp create mode 100644 test/syntax_check/invoke.h.t.cpp create mode 100644 test/syntax_check/manchester.h.t.cpp create mode 100644 test/syntax_check/not_null.h.t.cpp create mode 100644 test/syntax_check/print.h.t.cpp create mode 100644 test/syntax_check/ranges.h.t.cpp create mode 100644 test/syntax_check/rounded_integral_division.h.t.cpp create mode 100644 test/syntax_check/signal.h.t.cpp create mode 100644 test/syntax_check/type_list.h.t.cpp delete mode 100644 test/test.sh create mode 100644 test/test_callback_timer_deferred_locked.cpp create mode 100644 test/test_closure_with_default_delegate.cpp create mode 100644 test/test_closure_with_default_delegate_constexpr.cpp create mode 100644 test/test_closure_with_inplace_function.cpp create mode 100644 test/test_concepts.cpp create mode 100644 test/test_const_map.cpp create mode 100644 test/test_const_map_constexpr.cpp create mode 100644 test/test_const_map_ext.cpp create mode 100644 test/test_const_map_ext_constexpr.cpp create mode 100644 test/test_const_multimap.cpp create mode 100644 test/test_const_multimap_constexpr.cpp create mode 100644 test/test_const_multimap_ext.cpp create mode 100644 test/test_const_multimap_ext_constexpr.cpp create mode 100644 test/test_const_multiset.cpp create mode 100644 test/test_const_multiset_constexpr.cpp create mode 100644 test/test_const_multiset_ext.cpp create mode 100644 test/test_const_multiset_ext_constexpr.cpp create mode 100644 test/test_const_set.cpp create mode 100644 test/test_const_set_constexpr.cpp create mode 100644 test/test_const_set_ext.cpp create mode 100644 test/test_const_set_ext_constexpr.cpp create mode 100644 test/test_crc16_opensafety_a.cpp create mode 100644 test/test_crc16_opensafety_b.cpp create mode 100644 test/test_crc64_iso.cpp create mode 100644 test/test_crc8_nrsc5.cpp create mode 100644 test/test_crc8_opensafety.cpp create mode 100644 test/test_delegate_observable.cpp create mode 100644 test/test_etl_assert.cpp create mode 100644 test/test_format.cpp create mode 100644 test/test_hfsm_transition_on_enter.cpp create mode 100644 test/test_inplace_function.cpp create mode 100644 test/test_intrusive_avl_tree.cpp create mode 100644 test/test_invoke.cpp create mode 100644 test/test_is_invocable.cpp create mode 100644 test/test_manchester.cpp create mode 100644 test/test_not_null_pointer.cpp create mode 100644 test/test_not_null_pointer_constexpr.cpp create mode 100644 test/test_not_null_unique_pointer.cpp create mode 100644 test/test_print.cpp create mode 100644 test/test_ranges.cpp create mode 100644 test/test_rounded_integral_division.cpp create mode 100644 test/test_signal.cpp delete mode 100644 test/vs2019/.gitignore delete mode 100644 test/vs2019/NatvisFile.natvis delete mode 100644 test/vs2019/cpp.hint delete mode 100644 test/vs2019/etl.sln delete mode 100644 test/vs2019/etl.vcxproj delete mode 100644 test/vs2019/etl.vcxproj.filters delete mode 100644 test/vs2019/etl_initialiser_list/etl_initialiser_list.vcxproj.filters create mode 100644 test/vs2022/delegate.natvis diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 00000000..22cc390f --- /dev/null +++ b/.bazelrc @@ -0,0 +1,26 @@ +# Bazel settings for ETL +build --enable_bzlmod +build --cxxopt=-std=c++17 + +# Cross-compilation: build flags + QEMU (mirrors .devcontainer/run-tests.sh) +# Each config sets CC + tool env vars so Bazel's auto-configured toolchain +# finds the full cross-tool suite, and --run_under for QEMU execution. +build:armhf --repo_env=CC=arm-linux-gnueabihf-gcc --repo_env=AR=arm-linux-gnueabihf-ar --repo_env=LD=arm-linux-gnueabihf-ld --repo_env=NM=arm-linux-gnueabihf-nm --repo_env=STRIP=arm-linux-gnueabihf-strip --repo_env=OBJDUMP=arm-linux-gnueabihf-objdump +build:armhf --cxxopt=-std=c++23 --copt=-DETL_NO_STL --copt=-O0 +test:armhf --run_under=/usr/bin/qemu-arm-static + +build:i386 --repo_env=CC=i686-linux-gnu-gcc --repo_env=AR=i686-linux-gnu-ar --repo_env=LD=i686-linux-gnu-ld --repo_env=NM=i686-linux-gnu-nm --repo_env=STRIP=i686-linux-gnu-strip --repo_env=OBJDUMP=i686-linux-gnu-objdump +build:i386 --cxxopt=-std=c++23 --copt=-DETL_NO_STL --copt=-O0 +test:i386 --run_under=/usr/bin/qemu-i386-static + +build:powerpc --repo_env=CC=powerpc-linux-gnu-gcc --repo_env=AR=powerpc-linux-gnu-ar --repo_env=LD=powerpc-linux-gnu-ld --repo_env=NM=powerpc-linux-gnu-nm --repo_env=STRIP=powerpc-linux-gnu-strip --repo_env=OBJDUMP=powerpc-linux-gnu-objdump +build:powerpc --cxxopt=-std=c++23 --copt=-DETL_NO_STL --copt=-O0 +test:powerpc --run_under=/usr/bin/qemu-ppc + +build:riscv64 --repo_env=CC=riscv64-linux-gnu-gcc --repo_env=AR=riscv64-linux-gnu-ar --repo_env=LD=riscv64-linux-gnu-ld --repo_env=NM=riscv64-linux-gnu-nm --repo_env=STRIP=riscv64-linux-gnu-strip --repo_env=OBJDUMP=riscv64-linux-gnu-objdump +build:riscv64 --cxxopt=-std=c++23 --copt=-DETL_NO_STL --copt=-O0 +test:riscv64 --run_under=/usr/bin/qemu-riscv64-static + +build:s390x --repo_env=CC=s390x-linux-gnu-gcc --repo_env=AR=s390x-linux-gnu-ar --repo_env=LD=s390x-linux-gnu-ld --repo_env=NM=s390x-linux-gnu-nm --repo_env=STRIP=s390x-linux-gnu-strip --repo_env=OBJDUMP=s390x-linux-gnu-objdump +build:s390x --cxxopt=-std=c++23 --copt=-DETL_NO_STL --copt=-O0 +test:s390x --run_under=/usr/bin/qemu-s390x-static diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 00000000..f9c71a52 --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +8.5.1 diff --git a/.clang-format b/.clang-format index 8a409985..67f77eb5 100644 --- a/.clang-format +++ b/.clang-format @@ -1,51 +1,184 @@ --- -#------------------------------------ -# Configuration for clang-format v12 -#------------------------------------ +BasedOnStyle: LLVM +Standard: Auto # let the formatter accept any C++ standard -Language: Cpp +# ============================================================================= +# Indentation +# ============================================================================= +TabWidth: 2 +ContinuationIndentWidth: 2 +ConstructorInitializerIndentWidth: 2 +NamespaceIndentation: All # everything inside namespace is indented +IndentCaseLabels: true # case labels at switch-body indent level +IndentCaseBlocks: true # indent block inside case label +IndentExternBlock: Indent +IndentWrappedFunctionNames: true # keep function name at same indent as return type +IndentPPDirectives: BeforeHash # nested #if / #include get indented before the # +PPIndentWidth: 2 -SortIncludes: true +# ============================================================================= +# Braces & line-break style +# ============================================================================= +BreakBeforeBraces: Allman +BreakConstructorInitializers: BeforeComma # colon on new line, commas lead +BreakInheritanceList: BeforeComma +BreakBeforeBinaryOperators: NonAssignment +BreakStringLiterals: false +AlwaysBreakTemplateDeclarations: Yes # template <…> always on its own line +BreakAfterAttributes: Always -BasedOnStyle: Chromium +# ============================================================================= +# Short statements +# ============================================================================= +AllowShortBlocksOnASingleLine: Empty +AllowShortFunctionsOnASingleLine: Empty # only empty bodies: void f() {} +AllowShortCaseLabelsOnASingleLine: true # case X: stmt; break; on one line +AllowShortLoopsOnASingleLine: true +AllowShortLambdasOnASingleLine: Inline -BinPackParameters: false -BitFieldColonSpacing: Both +# ============================================================================= +# Empty lines +# ============================================================================= +KeepEmptyLinesAtTheStartOfBlocks: false +EmptyLineBeforeAccessModifier: Always # blank line before public:/private:/protected: +EmptyLineAfterAccessModifier: Always # blank line after public:/private:/protected: +InsertNewlineAtEOF: true -BreakBeforeBraces: Allman -BreakConstructorInitializers: BeforeComma +# ============================================================================= +# Spacing +# ============================================================================= +SpacesInAngles: Leave # preserve C++03 "> >" vs C++11 ">>" +SpacesInContainerLiterals: false -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: true -AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: false - -AllowAllArgumentsOnNextLine: true -AllowAllParametersOfDeclarationOnNextLine: true - -ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' -ConstructorInitializerIndentWidth: '2' - -NamespaceIndentation: All -IndentPPDirectives: BeforeHash -PointerAlignment: Left -ColumnLimit: '0' -ContinuationIndentWidth: '2' -UseTab: Never -TabWidth: '2' -IndentWidth: '2' -AccessModifierOffset : '-2' -IndentCaseLabels: false -Cpp11BracedListStyle: 'true' -AlignAfterOpenBracket: Align +# ============================================================================= +# Alignment +# ============================================================================= +PointerAlignment: Left # T* ptr, const T& ref +ReferenceAlignment: Left +AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: true +AlignConsecutiveBitFields: true +AlignConsecutiveMacros: true # align macro bodies -#------------------------------------ -# Configurations not supported by clang-format v12 -#------------------------------------ -# BreakInheritanceList: AfterComma -# EmptyLineBeforeAccessModifier: Always -# EmptyLineAfterAccessModifier: Always -# ReferenceAlignment: Left +# ============================================================================= +# Line length and wrapping +# ============================================================================= +ColumnLimit: 150 +ReflowComments: true # preserve hand-formatted comment rulers +AlignEscapedNewlines: Left -... +# ============================================================================= +# Includes +# ============================================================================= +IncludeCategories: + - Regex: '^(<|")(.*/)?platform\.h(>|")$' + Priority: -1 + - Regex: 'private' + Priority: 1 + - Regex: '.*' + Priority: 0 + +# ============================================================================= +# Arguments, parameters and constructor initialisers +# ============================================================================= +PackConstructorInitializers: Never # each initialiser on its own line + +# ============================================================================= +# Namespaces and using declarations +# ============================================================================= +SortUsingDeclarations: Lexicographic + +# ============================================================================= +# Macro-aware formatting +# ============================================================================= +# ETL-specific macros that should be treated as statement-level constructs +StatementMacros: + - ETL_DECLARE_DEBUG_COUNT + - ETL_INCREMENT_DEBUG_COUNT + - ETL_DECREMENT_DEBUG_COUNT + - ETL_ADD_DEBUG_COUNT + - ETL_STATIC_ASSERT + - ETL_ASSERT + - ETL_ASSERT_OR_RETURN + - ETL_ASSERT_OR_RETURN_VALUE + - ETL_ASSERT_FAIL + - ETL_ASSERT_FAIL_AND_RETURN + - ETL_ASSERT_FAIL_AND_RETURN_VALUE + - ETL_MOVE + - ETL_ENUM_CLASS + - ETL_ENUM_CLASS_TYPE + - ETL_IF_CONSTEXPR + +# Macros that behave like attributes or specifiers. +AttributeMacros: + - ETL_NORETURN + - ETL_FINAL + - ETL_OVERRIDE + - ETL_EXPLICIT + - ETL_DELETE + - ETL_CONSTANT + - ETL_CONSTEXPR + - ETL_CONSTEXPR11 + - ETL_CONSTEXPR14 + - ETL_CONSTEXPR17 + - ETL_CONSTEXPR20 + - ETL_CONSTEXPR23 + - ETL_CONSTEVAL + - ETL_NODISCARD + - ETL_NORETURN + - ETL_DEPRECATED + - ETL_DEPRECATED_REASON + - ETL_LIKELY + - ETL_UNLIKELY + - ETL_FALLTHROUGH + - ETL_MAYBE_UNUSED + - ETL_INLINE_VAR + - ETL_ASSUME + - ETL_LVALUE_REF_QUALIFIER + - ETL_RVALUE_REF_QUALIFIER + - ETL_NOEXCEPT + - ETL_NOEXCEPT_EXPR + - ETL_NOEXCEPT_IF + - ETL_NOEXCEPT_FROM + +Macros: + - ETL_NORETURN=[[noreturn]] + - ETL_FINAL=final + - ETL_OVERRIDE=override + - ETL_EXPLICIT=explicit + - ETL_DELETE=delete + - ETL_CONSTANT=const + - ETL_CONSTEXPR=constexpr + - ETL_CONSTEXPR11=constexpr + - ETL_CONSTEXPR14=constexpr + - ETL_CONSTEXPR17=constexpr + - ETL_CONSTEXPR20=constexpr + - ETL_CONSTEXPR23=constexpr + - ETL_CONSTEVAL=consteval + - ETL_NODISCARD=[[nodiscard]] + - ETL_NORETURN=[[noreturn]] + - ETL_DEPRECATED=[[deprecated]] +# - ETL_DEPRECATED_REASON=[[deprecated(%0)]] # Hangs with clang-format 18 + - ETL_LIKELY=[[likely]] + - ETL_UNLIKELY=[[unlikely]] + - ETL_FALLTHROUGH=[[fallthrough]] + - ETL_MAYBE_UNUSED=[[maybe_unused]] + - ETL_INLINE_VAR=inline + - ETL_ASSUME=[[assume(&0)]] + - ETL_LVALUE_REF_QUALIFIER=& + - ETL_RVALUE_REF_QUALIFIER=&& + - ETL_NOEXCEPT=noexcept +# - ETL_NOEXCEPT_EXPR=noexcept(&0)) # Hangs with clang-format 18 +# - ETL_NOEXCEPT_IF=noexcept(&0) # Hangs with clang-format 18 +# - ETL_NOEXCEPT_FROM=noexcept(&0) # Hangs with clang-format 18 + +# Macros that behave like type names +TypenameMacros: + - ETL_OR_STD + +# Do not reformat these macros — they contain DSL-like content +WhitespaceSensitiveMacros: + - ETL_ERROR_TEXT + - ETL_DECLARE_ENUM_TYPE + - ETL_ENUM_TYPE + - ETL_END_ENUM_TYPE diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..59753925 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,182 @@ +--- +# TODO: Enable these checks in smaller steps +# cppcoreguidelines-*, +# portability-* if needed +# readability-*, -readability-magic-numbers, +# misc-*, -misc-no-recursion, +# modernize-*, -modernize-use-trailing-return-type, +# performance-*, + +Checks: >- + cert-*, -cert-dcl37-c, -cert-dcl51-cpp, + clang-analyzer-*, + bugprone-*, + -bugprone-easily-swappable-parameters, + cppcoreguidelines-pro-type-vararg, + cppcoreguidelines-pro-type-reinterpret-cast, + llvm-*,-llvm-header-guard,-llvm-include-order, + google-readability-casting +ExtraArgs: ['-Wno-unknown-warning-option'] +HeaderFileExtensions: ['h', 'hpp'] +HeaderFilterRegex: '.*include/etl/.*' +ImplementationFileExtensions: ['cpp'] +UseColor: true +# TODO: Enable these when readability check is enabled +# CheckOptions : +# - key: readability-identifier-naming.AbstractClassCase +# value: snake_case +# - key: readability-identifier-naming.AbstractClassPrefix +# value: I +# - key: readability-identifier-naming.AbstractClassSuffix +# value: '' +# - key: readability-identifier-naming.ClassCase +# value: snake_case +# - key: readability-identifier-naming.ClassPrefix +# value: '' +# - key: readability-identifier-naming.ClassSuffix +# value: '' +# - key: readability-identifier-naming.GlobalConstantCase +# value: UPPER_CASE +# - key: readability-identifier-naming.GlobalConstantPrefix +# value: '' +# - key: readability-identifier-naming.GlobalConstantSuffix +# value: '' +# - key: readability-identifier-naming.ConstantCase +# value: snake_case +# - key: readability-identifier-naming.ConstantPrefix +# value: '' +# - key: readability-identifier-naming.ConstantSuffix +# value: '' +# - key: readability-identifier-naming.ConstantMemberCase +# value: snake_case +# - key: readability-identifier-naming.ConstantMemberPrefix +# value: k +# - key: readability-identifier-naming.ConstantMemberSuffix +# value: '' +# - key: readability-identifier-naming.StaticConstantCase +# value: snake_case +# - key: readability-identifier-naming.StaticConstantPrefix +# value: k +# - key: readability-identifier-naming.StaticConstantSuffix +# value: '' +# - key: readability-identifier-naming.EnumCase +# value: snake_case +# - key: readability-identifier-naming.EnumPrefix +# value: '' +# - key: readability-identifier-naming.EnumSuffix +# value: '' +# - key: readability-identifier-naming.EnumConstantCase +# value: snake_case +# - key: readability-identifier-naming.EnumConstantPrefix +# value: '' +# - key: readability-identifier-naming.EnumConstantSuffix +# value: '' +# - key: readability-identifier-naming.GlobalVariableCase +# value: snake_case +# - key: readability-identifier-naming.GlobalVariablePrefix +# value: g +# - key: readability-identifier-naming.GlobalVariableSuffix +# value: '' +# - key: readability-identifier-naming.LocalVariableCase +# value: snake_case +# - key: readability-identifier-naming.LocalVariablePrefix +# value: '' +# - key: readability-identifier-naming.LocalVariableSuffix +# value: '' +# - key: readability-identifier-naming.StructCase +# value: aNy_CasE +# - key: readability-identifier-naming.StructPrefix +# value: '' +# - key: readability-identifier-naming.StructSuffix +# value: '' +# - key: readability-identifier-naming.FunctionCase +# value: snake_case +# - key: readability-identifier-naming.FunctionPrefix +# value: '' +# - key: readability-identifier-naming.FunctionSuffix +# value: '' +# - key: readability-identifier-naming.MethodCase +# value: snake_case +# - key: readability-identifier-naming.MethodPrefix +# value: '' +# - key: readability-identifier-naming.MethodSuffix +# value: '' +# - key: readability-identifier-naming.ParameterCase +# value: snake_case +# - key: readability-identifier-naming.PrivateMethodCase +# value: snake_case +# - key: readability-identifier-naming.PrivateMethodPrefix +# value: '' +# - key: readability-identifier-naming.PrivateMethodSuffix +# value: '' +# - key: readability-identifier-naming.PublicMethodCase +# value: snake_case +# - key: readability-identifier-naming.PublicMethodPrefix +# value: '' +# - key: readability-identifier-naming.PublicMethodSuffix +# value: '' +# - key: readability-identifier-naming.MemberCase +# value: snake_case +# - key: readability-identifier-naming.MemberPrefix +# value: _ +# - key: readability-identifier-naming.MemberSuffix +# value: '' +# - key: readability-identifier-naming.PrivateMemberCase +# value: snake_case +# - key: readability-identifier-naming.PrivateMemberPrefix +# value: _ +# - key: readability-identifier-naming.PrivateMemberSuffix +# value: '' +# - key: readability-identifier-naming.PublicMemberCase +# value: snake_case +# - key: readability-identifier-naming.PublicMemberPrefix +# value: '' +# - key: readability-identifier-naming.PublicMemberSuffix +# value: '' +# - key: readability-identifier-naming.NamespaceCase +# value: lower_case +# - key: readability-identifier-naming.NamespacePrefix +# value: '' +# - key: readability-identifier-naming.NamespaceSuffix +# value: '' +# - key: readability-identifier-naming.InlineNamespaceCase +# value: lower_case +# - key: readability-identifier-naming.InlineNamespacePrefix +# value: '' +# - key: readability-identifier-naming.InlineNamespaceSuffix +# value: '' +# - key: readability-identifier-length.IgnoredParameterNames +# value: ^(n|id|a|b|x|y)$ +# - key: readability-identifier-length.IgnoredLoopCounterNames +# value: ^[ijkxy_]$ +# - key: readability-identifier-naming.GlobalFunctionCase +# value: snake_case +# - key: readability-identifier-naming.GlobalFunctionPrefix +# value: '' +# - key: readability-identifier-naming.GlobalFunctionSuffix +# value: '' +# - key: readability-identifier-naming.TemplateParameterCase +# value: CamelCase +# - key: readability-identifier-naming.TemplateParameterPrefix +# value: '' +# - key: readability-identifier-naming.TemplateParameterSuffix +# value: '' +# - key: readability-identifier-naming.TemplateTemplateParameterCase +# value: CamelCase +# - key: readability-identifier-naming.TemplateTemplateParameterPrefix +# value: 'TPL' +# - key: readability-identifier-naming.TemplateTemplateParameterSuffix +# value: '' +# - key: readability-identifier-naming.TypeTemplateParameterCase +# value: CamelCase +# - key: readability-identifier-naming.TypeTemplateParameterPrefix +# value: 'T' +# - key: readability-identifier-naming.TypeTemplateParameterSuffix +# value: '' +# - key: readability-identifier-naming.ValueTemplateParameterCase +# value: UPPER_CASE +# - key: readability-identifier-naming.ValueTemplateParameterPrefix +# value: '' +# - key: readability-identifier-naming.ValueTemplateParameterSuffix +# value: '' +... diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 00000000..b3565c23 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,200 @@ +language: "en-GB" +early_access: false + +reviews: + profile: "chill" + request_changes_workflow: false + high_level_summary: false + high_level_summary_in_walkthrough: false + poem: false + review_status: false + collapse_walkthrough: false + changed_files_summary: false + sequence_diagrams: false + estimate_code_review_effort: false + assess_linked_issues: false + related_issues: false + related_prs: false + suggested_labels: false + suggested_reviewers: false + auto_review: + enabled: true + drafts: false + path_instructions: + - path: "include/etl/*.h" + instructions: | + Review the C++ code in these directories. The code must not use + STL containers but must instead rely on Embedded Template Library + (ETL) for data structures and algorithms. + + When answering questions, provide accurate and concise information based on the ETL documentation and codebase. If you don't know the answer, just say "I don't know". Do not make up answers. + When providing code examples, ensure they are relevant to the ETL and follow its conventions. + Always be polite and professional in your responses. + + Header files should start with the ETL's standard MIT comment block. + + Header files should have include guards in the format '#ifndef ETL_>_INCLUDED #define ETL__INCLUDED #endif' + + Headers should be organized in the following order + - The first header include should be '#include "platform.h"' + - Headers from the ETL + - Headers from the path 'private/**' + - C++ standard library headers + - C standard library headers + + Pay extra attention to the following + - Buffer overflows + - Memory leaks + - Undefined behavior + + Check that the following conventions are used + - Variable names should be in `snake_case` + - Macro constants should be `ALL_CAPS_WITH_UNDERSCORES` + - Macro constants should be prefixed with 'ETL_' + - Function, class, and type names should be `snake_case` + - enum members should be `Caps_Snake_Case` + + Please keep your outputs short and to the point, unless otherwise asked + - Keep your responses short, describe small issues in a few sentences + - Don't output tips, analysis chains or anything else with a collapsible view + - Don't output `comment summaries` or `fix prompts for AIs` + - If the highlighted issue is complex, don't suggest a solution + - Don't use emojis + + - path: "include/etl/atomic/*.h" + instructions: | + Review the C++ code in these directories. The code must not use + STL containers but must instead rely on Embedded Template Library + (ETL) for data structures and algorithms. + + When answering questions, provide accurate and concise information based on the ETL documentation and codebase. If you don't know the answer, just say "I don't know". Do not make up answers. + When providing code examples, ensure they are relevant to the ETL and follow its conventions. + Always be polite and professional in your responses. + + Header files should start with the ETL's standard MIT comment block. + + Header files are allowed to not have include guards + + Headers should be organized in the following order + - Headers from the ETL + - Headers from the path 'private/**' + - C++ standard library headers + - C standard library headers + + Pay extra attention to the following + - Buffer overflows + - Memory leaks + - Undefined behavior + + Check that the following conventions are used + - Variable names should be in `snake_case` + - Macro constants should be `ALL_CAPS_WITH_UNDERSCORES` + - Macro constants should be prefixed with 'ETL_' + - Function, class, and type names should be `snake_case` + - enum members should be `Caps_Snake_Case` + + Please keep your outputs short and to the point, unless otherwise asked + - Keep your responses short, describe small issues in a few sentences + - Don't output tips, analysis chains or anything else with a collapsible view + - Don't output `comment summaries` or `fix prompts for AIs` + - If the highlighted issue is complex, don't suggest a solution + - Don't use emojis + + - path: "include/etl/atomic/*.h" + instructions: | + Review the C++ code in these directories. The code must not use + STL containers but must instead rely on Embedded Template Library + (ETL) for data structures and algorithms. + + When answering questions, provide accurate and concise information based on the ETL documentation and codebase. If you don't know the answer, just say "I don't know". Do not make up answers. + When providing code examples, ensure they are relevant to the ETL and follow its conventions. + Always be polite and professional in your responses. + + Header files should start with the ETL's standard MIT comment block. + + Header files are allowed to not have include guards + + Headers should be organized in the following order + - Headers from the ETL + - Headers from the path 'private/**' + - C++ standard library headers + - C standard library headers + + Pay extra attention to the following + - Buffer overflows + - Memory leaks + - Undefined behavior + + Check that the following conventions are used + - Variable names should be in `snake_case` + - Macro constants should be `ALL_CAPS_WITH_UNDERSCORES` + - Macro constants should be prefixed with 'ETL_' + - Function, class, and type names should be `snake_case` + - enum members should be `Caps_Snake_Case` + + Please keep your outputs short and to the point, unless otherwise asked + - Keep your responses short, describe small issues in a few sentences + - Don't output tips, analysis chains or anything else with a collapsible view + - Don't output `comment summaries` or `fix prompts for AIs` + - If the highlighted issue is complex, don't suggest a solution + - Don't use emojis + + - path: "include/etl/mutex/*.h" + instructions: | + Review the C++ code in these directories. The code must not use + STL containers but must instead rely on Embedded Template Library + (ETL) for data structures and algorithms. + + When answering questions, provide accurate and concise information based on the ETL documentation and codebase. If you don't know the answer, just say "I don't know". Do not make up answers. + When providing code examples, ensure they are relevant to the ETL and follow its conventions. + Always be polite and professional in your responses. + + Header files should start with the ETL's standard MIT comment block. + + Header files are allowed to not have include guards + + Headers should be organized in the following order + - Headers from the ETL + - Headers from the path 'private/**' + - C++ standard library headers + - C standard library headers + + Pay extra attention to the following + - Buffer overflows + - Memory leaks + - Undefined behavior + + Check that the following conventions are used + - Variable names should be in `snake_case` + - Macro constants should be `ALL_CAPS_WITH_UNDERSCORES` + - Macro constants should be prefixed with 'ETL_' + - Function, class, and type names should be `snake_case` + - enum members should be `Caps_Snake_Case` + + Please keep your outputs short and to the point, unless otherwise asked + - Keep your responses short, describe small issues in a few sentences + - Don't output tips, analysis chains or anything else with a collapsible view + - Don't output `comment summaries` or `fix prompts for AIs` + - If the highlighted issue is complex, don't suggest a solution + - Don't use emojis + + - path: "include/etl/deprecated/*.h" + instructions: | + Ingnore files in this directory + + - path: "include/etl/experimental/*.h" + instructions: | + Ingnore files in this directory + + - path: "include/etl/generators/*.h" + instructions: | + Ingnore files in this directory + + - path: "include/etl/profiles/*.h" + instructions: | + Ingnore files in this directory + +chat: + art: false + auto_reply: true + diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4cd52cc1..2e08080a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,18 +1,78 @@ -ARG BASE_IMAGE_NAME="clang:latest" +ARG BASE_IMAGE_NAME="mcr.microsoft.com/devcontainers/cpp:2@sha256:a5eb5a1e9109af88bf82ebb0f71903608a68144851ed1e4b852e31b251ac59c6" FROM ${BASE_IMAGE_NAME} -ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.31.7" +ARG DEBIAN_SNAPSHOT="20260223T000000Z" -# Optionally install the cmake for vcpkg -COPY ./reinstall-cmake.sh /tmp/ +SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends \ - git \ - wget +ENV LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 \ + TZ=UTC -RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \ - chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \ +RUN set -eux \ + && export DEBIAN_FRONTEND=noninteractive \ + && if [[ "${DEBIAN_SNAPSHOT}" != "none" ]]; then \ + snapshot_main="http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}"; \ + snapshot_security="http://snapshot.debian.org/archive/debian-security/${DEBIAN_SNAPSHOT}"; \ + if [[ -f /etc/apt/sources.list.d/debian.sources ]]; then \ + sed -ri "s|^URIs: https?://deb.debian.org/debian$|URIs: ${snapshot_main}|g" /etc/apt/sources.list.d/debian.sources; \ + sed -ri "s|^URIs: https?://deb.debian.org/debian-security$|URIs: ${snapshot_security}|g" /etc/apt/sources.list.d/debian.sources; \ + elif [[ -f /etc/apt/sources.list ]] || compgen -G "/etc/apt/sources.list.d/*.list" > /dev/null; then \ + for list_file in /etc/apt/sources.list /etc/apt/sources.list.d/*.list; do \ + [[ -f "${list_file}" ]] || continue; \ + sed -ri "s|https?://deb.debian.org/debian|${snapshot_main}|g" "${list_file}"; \ + sed -ri "s|https?://security.debian.org/debian-security|${snapshot_security}|g" "${list_file}"; \ + sed -ri "s|https?://deb.debian.org/debian-security|${snapshot_security}|g" "${list_file}"; \ + done; \ + else \ + echo "ERROR: DEBIAN_SNAPSHOT='${DEBIAN_SNAPSHOT}' is set, but no supported apt source files were found."; \ + echo "Expected /etc/apt/sources.list.d/debian.sources or one or more .list files under /etc/apt/."; \ + exit 1; \ + fi; \ + printf 'Acquire::Check-Valid-Until "false";\n' > /etc/apt/apt.conf.d/99snapshot; \ fi \ - && rm -f /tmp/reinstall-cmake.sh + && apt-get update \ + && apt-get -y install --no-install-recommends \ + python3-full \ + python3-pip \ + python3-cogapp \ + git \ + wget \ + cmake \ + clang-format \ + clang-format-18 \ + lcov \ + && rm -rf /var/lib/apt/lists/* + +RUN set -eux; \ + VERSION="2.4.1"; \ + case "$(uname -m)" in \ + x86_64) ARCH="amd64"; SHA256="bdaa2c0fbee03e5c2f99e605d9419386ce5d558440baac2017398faada839e04" ;; \ + aarch64) ARCH="arm64"; SHA256="0a09e1f04a0f8a86fd4e709552613f5d82adf6bc72f0a4b5e217670894e79fbf" ;; \ + *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;; \ + esac; \ + wget -O treefmt.tar.gz "https://github.com/numtide/treefmt/releases/download/v${VERSION}/treefmt_${VERSION}_linux_${ARCH}.tar.gz" \ + && echo "${SHA256} treefmt.tar.gz" | sha256sum -c \ + && tar xzf treefmt.tar.gz treefmt \ + && install -m 755 treefmt /usr/bin/treefmt \ + && rm treefmt.tar.gz treefmt + +# Install Bazelisk as 'bazel' +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + wget -qO /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH} && \ + chmod +x /usr/local/bin/bazel + +RUN set -eux \ + && echo "Pip version: " \ + && pip --version \ + && echo "Cogapp version: " \ + && pip show cogapp \ + && echo "Git version: " \ + && git --version \ + && echo "Wget version: " \ + && wget --version \ + && echo "Cmake version: " \ + && cmake --version \ + && echo "Make version: " \ + && make --version diff --git a/.devcontainer/armhf/Dockerfile b/.devcontainer/armhf/Dockerfile new file mode 100644 index 00000000..a6f866df --- /dev/null +++ b/.devcontainer/armhf/Dockerfile @@ -0,0 +1,61 @@ +# armhf Test Environment for ETL +# Uses QEMU user-mode emulation to run armhf binaries on x64 host +FROM debian:trixie + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# Install QEMU user-mode emulation and armhf cross-compilation tools +RUN dpkg --add-architecture armhf && \ + apt-get update && apt-get install -y --no-install-recommends \ + qemu-user-static \ + qemu-user \ + binfmt-support \ + gcc-arm-linux-gnueabihf \ + g++-arm-linux-gnueabihf \ + cmake \ + make \ + ninja-build \ + git \ + wget \ + ca-certificates \ + file \ + libc6:armhf \ + libstdc++6:armhf \ + libatomic1:armhf \ + && rm -rf /var/lib/apt/lists/* + +# Create non-root user with stable UID/GID +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=1000 + +RUN groupadd --gid ${USER_GID} ${USERNAME} && \ + useradd --uid ${USER_UID} --gid ${USER_GID} --shell /bin/bash --create-home ${USERNAME} + +# Set working directory +WORKDIR /workspaces/etl + +# Install Bazelisk as 'bazel' +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + wget -qO /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH} && \ + chmod +x /usr/local/bin/bazel + +# Verify QEMU and cross-compilation setup +RUN echo "=== Host Architecture ===" && \ + uname -m && \ + echo "" && \ + echo "=== armhf Cross Compiler ===" && \ + arm-linux-gnueabihf-gcc --version && \ + echo "" && \ + echo "=== QEMU arm ===" && \ + qemu-arm-static --version | head -n1 + +# Ensure workspace directory ownership for non-root user +RUN mkdir -p /workspaces/etl && chown -R ${USERNAME}:${USERNAME} /workspaces + +# Switch to non-root user +USER ${USERNAME} + +# Default command +CMD ["/bin/bash"] diff --git a/.devcontainer/armhf/devcontainer.json b/.devcontainer/armhf/devcontainer.json new file mode 100644 index 00000000..a1dc285e --- /dev/null +++ b/.devcontainer/armhf/devcontainer.json @@ -0,0 +1,29 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "armhf (Debian)", + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools" + ], + "settings": { + "cmake.sourceDirectory": "${workspaceFolder}/test", + "cmake.configureArgs": [ + "-DCMAKE_TOOLCHAIN_FILE=${workspaceFolder}/.devcontainer/armhf/toolchain-armhf.cmake", + "-DBUILD_TESTS=ON", + "-DNO_STL=OFF", + "-DETL_CXX_STANDARD=23" + ], + "cmake.buildDirectory": "${workspaceFolder}/build-armhf", + "cmake.generator": "Ninja" + } + } + }, + "remoteUser": "root" +} diff --git a/.devcontainer/armhf/toolchain-armhf.cmake b/.devcontainer/armhf/toolchain-armhf.cmake new file mode 100644 index 00000000..a7f9f00a --- /dev/null +++ b/.devcontainer/armhf/toolchain-armhf.cmake @@ -0,0 +1,21 @@ +# CMake toolchain file for armhf cross-compilation +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR arm) + +# Specify the cross compiler +set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) +set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) +set(CMAKE_AR arm-linux-gnueabihf-ar) +set(CMAKE_RANLIB arm-linux-gnueabihf-ranlib) +set(CMAKE_STRIP arm-linux-gnueabihf-strip) + +# Search for programs in the build host directories +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# For libraries and headers in the target directories +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +# Set QEMU for running tests +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm-static CACHE FILEPATH "Path to the emulator for cross-compiled binaries") diff --git a/.devcontainer/clang10/devcontainer.json b/.devcontainer/clang10/devcontainer.json index d34b0411..d62c3ce3 100644 --- a/.devcontainer/clang10/devcontainer.json +++ b/.devcontainer/clang10/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:10" + "BASE_IMAGE_NAME": "silkeh/clang:10", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang11/devcontainer.json b/.devcontainer/clang11/devcontainer.json index 6727e497..e83ec9f4 100644 --- a/.devcontainer/clang11/devcontainer.json +++ b/.devcontainer/clang11/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:11" + "BASE_IMAGE_NAME": "silkeh/clang:11", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang12/devcontainer.json b/.devcontainer/clang12/devcontainer.json index 26ab72ca..6a6407cf 100644 --- a/.devcontainer/clang12/devcontainer.json +++ b/.devcontainer/clang12/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:12" + "BASE_IMAGE_NAME": "silkeh/clang:12", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang13/devcontainer.json b/.devcontainer/clang13/devcontainer.json index 309ced68..46197161 100644 --- a/.devcontainer/clang13/devcontainer.json +++ b/.devcontainer/clang13/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:13" + "BASE_IMAGE_NAME": "silkeh/clang:13", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang14/devcontainer.json b/.devcontainer/clang14/devcontainer.json index ecdf0ad9..13512eff 100644 --- a/.devcontainer/clang14/devcontainer.json +++ b/.devcontainer/clang14/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:14" + "BASE_IMAGE_NAME": "silkeh/clang:14", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang15/devcontainer.json b/.devcontainer/clang15/devcontainer.json index 35a1ccef..42051a63 100644 --- a/.devcontainer/clang15/devcontainer.json +++ b/.devcontainer/clang15/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:15" + "BASE_IMAGE_NAME": "silkeh/clang:15", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang16/devcontainer.json b/.devcontainer/clang16/devcontainer.json index aa9b25ee..8284ae3a 100644 --- a/.devcontainer/clang16/devcontainer.json +++ b/.devcontainer/clang16/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:16" + "BASE_IMAGE_NAME": "silkeh/clang:16", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang17/devcontainer.json b/.devcontainer/clang17/devcontainer.json index deb08dbb..ca9747fa 100644 --- a/.devcontainer/clang17/devcontainer.json +++ b/.devcontainer/clang17/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:17" + "BASE_IMAGE_NAME": "silkeh/clang:17", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang18/devcontainer.json b/.devcontainer/clang18/devcontainer.json index d7954145..5ff70469 100644 --- a/.devcontainer/clang18/devcontainer.json +++ b/.devcontainer/clang18/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:18-bullseye" + "BASE_IMAGE_NAME": "silkeh/clang:18-bullseye", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang19/devcontainer.json b/.devcontainer/clang19/devcontainer.json index 7c525acf..bc617a36 100644 --- a/.devcontainer/clang19/devcontainer.json +++ b/.devcontainer/clang19/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:19-bullseye" + "BASE_IMAGE_NAME": "silkeh/clang:19-bullseye", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang20/devcontainer.json b/.devcontainer/clang20/devcontainer.json index 0dadc10b..5522774f 100644 --- a/.devcontainer/clang20/devcontainer.json +++ b/.devcontainer/clang20/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:20-bullseye" + "BASE_IMAGE_NAME": "silkeh/clang:20-bullseye", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang21/devcontainer.json b/.devcontainer/clang21/devcontainer.json new file mode 100644 index 00000000..e09e5c3a --- /dev/null +++ b/.devcontainer/clang21/devcontainer.json @@ -0,0 +1,13 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "Clang 21", + "build": { + "dockerfile": "../Dockerfile", + "args": { + "BASE_IMAGE_NAME": "silkeh/clang:21-bullseye", + "DEBIAN_SNAPSHOT": "none" + }, + "context": "../context" + } +} diff --git a/.devcontainer/clang7/devcontainer.json b/.devcontainer/clang7/devcontainer.json index 09a67efa..87d7c7e1 100644 --- a/.devcontainer/clang7/devcontainer.json +++ b/.devcontainer/clang7/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:7" + "BASE_IMAGE_NAME": "silkeh/clang:7", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang8/devcontainer.json b/.devcontainer/clang8/devcontainer.json index 99a853e5..c29c069c 100644 --- a/.devcontainer/clang8/devcontainer.json +++ b/.devcontainer/clang8/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:8" + "BASE_IMAGE_NAME": "silkeh/clang:8", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/clang9/devcontainer.json b/.devcontainer/clang9/devcontainer.json index b77d4f2b..308f8ba2 100644 --- a/.devcontainer/clang9/devcontainer.json +++ b/.devcontainer/clang9/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "silkeh/clang:9" + "BASE_IMAGE_NAME": "silkeh/clang:9", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/context/reinstall-cmake.sh b/.devcontainer/context/reinstall-cmake.sh deleted file mode 100644 index 280d8145..00000000 --- a/.devcontainer/context/reinstall-cmake.sh +++ /dev/null @@ -1,291 +0,0 @@ -#!/usr/bin/env bash - -# For more detailed debugging, uncomment the next line -# set -x - -# Explicitly set CMAKE_VERSION from first argument, default to "none" -CMAKE_VERSION=${1:-"none"} - -# --- Configuration --- -DOWNLOAD_ATTEMPTS=3 -DOWNLOAD_RETRY_DELAY=5 # seconds - -# --- Global Variables --- -TMP_DIR="" # Initialize TMP_DIR, will be set by mktemp -# Filenames used within TMP_DIR -CMAKE_INSTALLER_SCRIPT_LOCAL_NAME="cmake-installer.sh" -CMAKE_CHECKSUM_FILE_LOCAL_NAME="cmake-checksums.txt" -# This will be the actual name of the CMake binary, derived from version and arch -# It's important for matching against the checksum file. -DERIVED_CMAKE_BINARY_FILENAME="" - -# --- Cleanup Function --- -# This trap will execute on EXIT, ERR, SIGINT, SIGTERM -# It's crucial for debugging to see the state of TMP_DIR if things go wrong. -cleanup() { - # $? is the exit code of the last command before the trap was triggered - # or the argument to exit if the script called exit explicitly. - LAST_EXIT_CODE=$? - echo # Newline for readability - - # Only proceed with detailed cleanup if TMP_DIR was actually created - if [[ -n "${TMP_DIR}" && -d "${TMP_DIR}" ]]; then - echo "--- Cleanup: Temporary Directory Inspector (${TMP_DIR}) ---" - echo "Listing contents of TMP_DIR:" - ls -la "${TMP_DIR}" - - # Check and display checksum file content - if [[ -f "${TMP_DIR}/${CMAKE_CHECKSUM_FILE_LOCAL_NAME}" ]]; then - echo "--- Content of downloaded checksum file (${CMAKE_CHECKSUM_FILE_LOCAL_NAME}) ---" - cat "${TMP_DIR}/${CMAKE_CHECKSUM_FILE_LOCAL_NAME}" - echo "--- End of checksum file ---" - else - echo "Checksum file (${CMAKE_CHECKSUM_FILE_LOCAL_NAME}) not found in TMP_DIR." - fi - - # Check and display head of (potentially) installer script - # Useful to see if it's an HTML error page - if [[ -f "${TMP_DIR}/${CMAKE_INSTALLER_SCRIPT_LOCAL_NAME}" ]]; then - echo "--- First 10 lines of downloaded installer script (${CMAKE_INSTALLER_SCRIPT_LOCAL_NAME}) ---" - head -n 10 "${TMP_DIR}/${CMAKE_INSTALLER_SCRIPT_LOCAL_NAME}" - echo "--- End of installer script head ---" - elif [[ -f "${TMP_DIR}/${DERIVED_CMAKE_BINARY_FILENAME}" ]]; then - # If it was renamed - echo "--- First 10 lines of downloaded installer script (${DERIVED_CMAKE_BINARY_FILENAME}) ---" - head -n 10 "${TMP_DIR}/${DERIVED_CMAKE_BINARY_FILENAME}" - echo "--- End of installer script head ---" - else - echo "Installer script not found in TMP_DIR (checked for ${CMAKE_INSTALLER_SCRIPT_LOCAL_NAME} and ${DERIVED_CMAKE_BINARY_FILENAME})." - fi - - echo "Attempting to remove temporary directory: ${TMP_DIR}" - rm -Rf "${TMP_DIR}" - echo "Temporary directory removed." - echo "--- End of Cleanup ---" - else - echo "--- Cleanup: TMP_DIR was not set or not a directory, no temp files to inspect or clean. ---" - fi - - # Ensure the script exits with the LAST_EXIT_CODE observed by the trap - # unless it was 0 and the script is exiting due to an explicit non-zero exit. - # The 'exit' command within the trap will override the script's natural exit code. - # So, if the script was going to exit 0, but cleanup had an issue, this could change it. - # However, for debugging an exit code 8, we want to preserve the code that *caused* the trap. - echo "Script finished with exit code: ${LAST_EXIT_CODE}." - exit "${LAST_EXIT_CODE}" -} -trap cleanup EXIT ERR SIGINT SIGTERM - -# Immediately turn on `set -e` after trap setup -set -e - -# --- Helper Functions --- -# Function to download a file with retries and basic validation -download_file() { - local url="$1" - local output_filename="$2" - local attempts_left=$DOWNLOAD_ATTEMPTS - local wget_exit_code=0 - - while [ $attempts_left -gt 0 ]; do - echo "Downloading: ${url}" - echo "Saving to: ${TMP_DIR}/${output_filename}" - echo "Attempt $((DOWNLOAD_ATTEMPTS - attempts_left + 1)) of ${DOWNLOAD_ATTEMPTS}..." - - # Use wget with: - # -O: specify output file - # --timeout: connection/read timeout - # --tries: number of retries (wget's own retry, distinct from this loop) - # --quiet: suppress normal output, but errors still go to stderr - # --show-progress: if not quiet, shows a progress bar (optional) - # Using -q for less verbose logs, but on failure, we need to know. - wget -O "${TMP_DIR}/${output_filename}" --timeout=30 --tries=1 "${url}" - wget_exit_code=$? - - if [ ${wget_exit_code} -eq 0 ]; then - echo "Download command successful for ${output_filename}." - if [ -s "${TMP_DIR}/${output_filename}" ]; then # -s: file exists and has a size greater than 0 - # Basic check for common HTML error page indicators - # This is a heuristic and might not catch all error pages. - if head -n 5 "${TMP_DIR}/${output_filename}" | grep -Eiq ' /dev/null; then - echo "wget not found. Attempting to install wget via apt-get..." - if command -v apt-get > /dev/null; then - apt-get update -y - apt-get install -y --no-install-recommends wget - echo "wget installed." - else - echo "ERROR: apt-get not found. Cannot install wget. Please install wget manually." - exit 1 - fi -else - echo "wget is available." -fi - -# 2. (Optional) Remove existing CMake installed via apt -echo "Attempting to remove any existing CMake installed via apt..." -if command -v apt-get > /dev/null; then - if dpkg -s cmake &> /dev/null; then # Check if cmake package is actually installed - apt-get -y purge --auto-remove cmake - echo "cmake package purged." - else - echo "cmake package not found via dpkg, skipping purge." - fi -else - echo "apt-get not found, skipping removal of CMake via apt." -fi - -# 3. Create installation and temporary directories -echo "Creating CMake installation directory /opt/cmake..." -mkdir -p /opt/cmake - -TMP_DIR=$(mktemp -d -t cmake-install-XXXXXXXXXX) -echo "Temporary directory created: ${TMP_DIR}" -# Crucial: subsequent operations needing temp files should happen in or relative to TMP_DIR -# We will cd into TMP_DIR later, or use full paths like ${TMP_DIR}/filename - -# 4. Determine system architecture -echo "Determining system architecture..." -architecture=$(dpkg --print-architecture) -case "${architecture}" in - arm64) ARCH="aarch64" ;; - amd64) ARCH="x86_64" ;; - *) - echo "ERROR: Unsupported architecture '${architecture}' reported by dpkg." - exit 1 - ;; -esac -echo "Detected architecture: ${architecture} (mapped to CMake arch: ${ARCH})" - -# 5. Define CMake download URLs and the filename expected by checksum -DERIVED_CMAKE_BINARY_FILENAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh" -CMAKE_BINARY_URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${DERIVED_CMAKE_BINARY_FILENAME}" -CMAKE_CHECKSUM_FILE_URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-SHA-256.txt" - -# 6. Download CMake binary and checksum file -echo "--- Downloading Files ---" -if ! download_file "${CMAKE_BINARY_URL}" "${CMAKE_INSTALLER_SCRIPT_LOCAL_NAME}"; then - echo "ERROR: Failed to download CMake binary installer. See messages above." - exit 1 -fi - -if ! download_file "${CMAKE_CHECKSUM_FILE_URL}" "${CMAKE_CHECKSUM_FILE_LOCAL_NAME}"; then - echo "ERROR: Failed to download CMake checksum file. See messages above." - exit 1 -fi -echo "Downloads complete." -echo "--- End of Downloading Files ---" -echo # Newline for readability - -# Before checksum, rename the downloaded installer to its derived name, -# as the checksum file refers to this specific name. -echo "Renaming downloaded installer from '${CMAKE_INSTALLER_SCRIPT_LOCAL_NAME}' to '${DERIVED_CMAKE_BINARY_FILENAME}' for checksum verification." -mv "${TMP_DIR}/${CMAKE_INSTALLER_SCRIPT_LOCAL_NAME}" "${TMP_DIR}/${DERIVED_CMAKE_BINARY_FILENAME}" -if [ ! -f "${TMP_DIR}/${DERIVED_CMAKE_BINARY_FILENAME}" ]; then - echo "ERROR: Failed to rename installer script for checksum. File '${TMP_DIR}/${DERIVED_CMAKE_BINARY_FILENAME}' does not exist after move." - exit 1 -fi - -# 7. Verify checksum -echo "--- Verifying Checksum ---" -echo "Checksum file is: ${TMP_DIR}/${CMAKE_CHECKSUM_FILE_LOCAL_NAME}" -echo "Binary file to check is: ${TMP_DIR}/${DERIVED_CMAKE_BINARY_FILENAME}" - -# Ensure the checksum file actually contains an entry for our binary -# This is important because the SHA-256.txt file contains checksums for *all* release assets -echo "Checking if checksum file contains entry for '${DERIVED_CMAKE_BINARY_FILENAME}'..." -if ! grep -q "${DERIVED_CMAKE_BINARY_FILENAME}" "${TMP_DIR}/${CMAKE_CHECKSUM_FILE_LOCAL_NAME}"; then - echo "ERROR: The downloaded checksum file '${CMAKE_CHECKSUM_FILE_LOCAL_NAME}' does NOT contain an entry for '${DERIVED_CMAKE_BINARY_FILENAME}'." - echo "This strongly suggests that the CMAKE_VERSION ('${CMAKE_VERSION}') or ARCH ('${ARCH}') is incorrect, or the specified version does not provide a .sh installer for this architecture." - echo "Please verify the version and available files at https://github.com/Kitware/CMake/releases/tag/v${CMAKE_VERSION}" - exit 1 -fi -echo "Checksum file contains an entry for '${DERIVED_CMAKE_BINARY_FILENAME}'." - -# Perform the checksum. We need to be in the directory where the files are. -echo "Changing directory to ${TMP_DIR} for checksum verification." -cd "${TMP_DIR}" # <<<<<<< IMPORTANT: sha256sum -c needs to find files - -echo "Verifying checksum of '${DERIVED_CMAKE_BINARY_FILENAME}' using '${CMAKE_CHECKSUM_FILE_LOCAL_NAME}'..." -# The --ignore-missing flag is good, as the .txt file has many checksums. -# The --strict flag would cause it to error if there are improperly formatted lines. -# We rely on the grep check above to ensure our specific file is mentioned. -if sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_FILE_LOCAL_NAME}"; then - echo "Checksum verification successful for '${DERIVED_CMAKE_BINARY_FILENAME}'." -else - SHA_EXIT_CODE=$? - echo "ERROR: Checksum verification FAILED for '${DERIVED_CMAKE_BINARY_FILENAME}' with exit code ${SHA_EXIT_CODE}." - # Cleanup trap will show file contents. - exit 1 # Critical failure -fi -echo "--- End of Verifying Checksum ---" -echo # Newline for readability - -# 8. Install CMake -echo "--- Installing CMake ---" -echo "Making the CMake installer script '${DERIVED_CMAKE_BINARY_FILENAME}' executable..." -chmod +x "${DERIVED_CMAKE_BINARY_FILENAME}" # Still in TMP_DIR - -echo "Executing CMake installer script: ./${DERIVED_CMAKE_BINARY_FILENAME} --prefix=/opt/cmake --skip-license" -# Execute the script. If this script exits with 8, this is our culprit. -if ./"${DERIVED_CMAKE_BINARY_FILENAME}" --prefix=/opt/cmake --skip-license; then - echo "CMake installer script executed successfully." -else - INSTALLER_EXIT_CODE=$? - echo "ERROR: CMake installer script FAILED with exit code ${INSTALLER_EXIT_CODE}." - # This is the most likely place for an exit code 8 if downloads and checksums were okay. - # The trap will handle cleanup. The script will exit with INSTALLER_EXIT_CODE due to the trap. - exit ${INSTALLER_EXIT_CODE} # Explicitly exit with the installer's code -fi -echo "--- End of Installing CMake ---" -echo # Newline for readability - -# 9. Create symlinks -echo "Creating symbolic links for cmake and ctest in /usr/local/bin/..." -ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake -ln -sf /opt/cmake/bin/ctest /usr/local/bin/ctest -echo "Symbolic links created." - -echo # Newline for readability -echo "SUCCESS: CMake ${CMAKE_VERSION} installation and setup complete." - -# The script will exit with 0 here. The trap will run, see $? is 0, and then exit 0. -exit 0 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 161faeec..5daf6034 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "./Dockerfile", "args": { - "BASE_IMAGE_NAME": "mcr.microsoft.com/devcontainers/cpp:debian-12" + "BASE_IMAGE_NAME": "mcr.microsoft.com/devcontainers/cpp:2@sha256:a5eb5a1e9109af88bf82ebb0f71903608a68144851ed1e4b852e31b251ac59c6", + "DEBIAN_SNAPSHOT": "20260223T000000Z" }, "context": "./context" } diff --git a/.devcontainer/gcc09/devcontainer.json b/.devcontainer/gcc09/devcontainer.json index ab5e64ee..d72b5f3c 100644 --- a/.devcontainer/gcc09/devcontainer.json +++ b/.devcontainer/gcc09/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "gcc:9" + "BASE_IMAGE_NAME": "gcc:9", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/gcc10/devcontainer.json b/.devcontainer/gcc10/devcontainer.json index 03bf117e..698402b8 100644 --- a/.devcontainer/gcc10/devcontainer.json +++ b/.devcontainer/gcc10/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "gcc:10" + "BASE_IMAGE_NAME": "gcc:10", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/gcc11/devcontainer.json b/.devcontainer/gcc11/devcontainer.json index 9d837fad..c8235db7 100644 --- a/.devcontainer/gcc11/devcontainer.json +++ b/.devcontainer/gcc11/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "gcc:11" + "BASE_IMAGE_NAME": "gcc:11", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/gcc12/devcontainer.json b/.devcontainer/gcc12/devcontainer.json index 9c07a79f..bee6541e 100644 --- a/.devcontainer/gcc12/devcontainer.json +++ b/.devcontainer/gcc12/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "gcc:12" + "BASE_IMAGE_NAME": "gcc:12", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/gcc13/devcontainer.json b/.devcontainer/gcc13/devcontainer.json index 4b9767e8..7434b808 100644 --- a/.devcontainer/gcc13/devcontainer.json +++ b/.devcontainer/gcc13/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "gcc:13" + "BASE_IMAGE_NAME": "gcc:13", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/gcc14/devcontainer.json b/.devcontainer/gcc14/devcontainer.json index 374ff299..33e043b9 100644 --- a/.devcontainer/gcc14/devcontainer.json +++ b/.devcontainer/gcc14/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "gcc:14" + "BASE_IMAGE_NAME": "gcc:14", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/gcc15/devcontainer.json b/.devcontainer/gcc15/devcontainer.json index 498a6fe8..143d5b16 100644 --- a/.devcontainer/gcc15/devcontainer.json +++ b/.devcontainer/gcc15/devcontainer.json @@ -5,7 +5,8 @@ "build": { "dockerfile": "../Dockerfile", "args": { - "BASE_IMAGE_NAME": "gcc:15" + "BASE_IMAGE_NAME": "gcc:15", + "DEBIAN_SNAPSHOT": "none" }, "context": "../context" } diff --git a/.devcontainer/i386/Dockerfile b/.devcontainer/i386/Dockerfile new file mode 100644 index 00000000..b879ee00 --- /dev/null +++ b/.devcontainer/i386/Dockerfile @@ -0,0 +1,61 @@ +# i386 Test Environment for ETL +# Uses QEMU user-mode emulation to run i386 binaries on x64 host +FROM debian:trixie + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# Install QEMU user-mode emulation and i386 cross-compilation tools +RUN dpkg --add-architecture i386 && \ + apt-get update && apt-get install -y --no-install-recommends \ + qemu-user-static \ + qemu-user \ + binfmt-support \ + gcc-i686-linux-gnu \ + g++-i686-linux-gnu \ + cmake \ + make \ + ninja-build \ + git \ + wget \ + ca-certificates \ + file \ + libc6:i386 \ + libstdc++6:i386 \ + libatomic1:i386 \ + && rm -rf /var/lib/apt/lists/* + +# Create non-root user with stable UID/GID +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=1000 + +RUN groupadd --gid ${USER_GID} ${USERNAME} && \ + useradd --uid ${USER_UID} --gid ${USER_GID} --shell /bin/bash --create-home ${USERNAME} + +# Set working directory +WORKDIR /workspaces/etl + +# Install Bazelisk as 'bazel' +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + wget -qO /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH} && \ + chmod +x /usr/local/bin/bazel + +# Verify QEMU and cross-compilation setup +RUN echo "=== Host Architecture ===" && \ + uname -m && \ + echo "" && \ + echo "=== i386 Cross Compiler ===" && \ + i686-linux-gnu-gcc --version && \ + echo "" && \ + echo "=== QEMU i386 ===" && \ + qemu-i386-static --version | head -n1 + +# Ensure workspace directory ownership for non-root user +RUN mkdir -p /workspaces/etl && chown -R ${USERNAME}:${USERNAME} /workspaces + +# Switch to non-root user +USER ${USERNAME} + +# Default command +CMD ["/bin/bash"] diff --git a/.devcontainer/i386/devcontainer.json b/.devcontainer/i386/devcontainer.json new file mode 100644 index 00000000..84e28a8e --- /dev/null +++ b/.devcontainer/i386/devcontainer.json @@ -0,0 +1,29 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "i386 (Debian)", + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools" + ], + "settings": { + "cmake.sourceDirectory": "${workspaceFolder}/test", + "cmake.configureArgs": [ + "-DCMAKE_TOOLCHAIN_FILE=${workspaceFolder}/.devcontainer/i386/toolchain-i386.cmake", + "-DBUILD_TESTS=ON", + "-DNO_STL=OFF", + "-DETL_CXX_STANDARD=23" + ], + "cmake.buildDirectory": "${workspaceFolder}/build-i386", + "cmake.generator": "Ninja" + } + } + }, + "remoteUser": "root" +} diff --git a/.devcontainer/i386/toolchain-i386.cmake b/.devcontainer/i386/toolchain-i386.cmake new file mode 100644 index 00000000..502e2285 --- /dev/null +++ b/.devcontainer/i386/toolchain-i386.cmake @@ -0,0 +1,21 @@ +# CMake toolchain file for i386 cross-compilation +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR i386) + +# Specify the cross compiler +set(CMAKE_C_COMPILER i686-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER i686-linux-gnu-g++) +set(CMAKE_AR i686-linux-gnu-ar) +set(CMAKE_RANLIB i686-linux-gnu-ranlib) +set(CMAKE_STRIP i686-linux-gnu-strip) + +# Search for programs in the build host directories +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# For libraries and headers in the target directories +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +# Set QEMU for running tests +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-i386-static CACHE FILEPATH "Path to the emulator for cross-compiled binaries") diff --git a/.devcontainer/powerpc/Dockerfile b/.devcontainer/powerpc/Dockerfile new file mode 100644 index 00000000..a2442782 --- /dev/null +++ b/.devcontainer/powerpc/Dockerfile @@ -0,0 +1,85 @@ +# powerpc Test Environment for ETL +# Uses QEMU user-mode emulation to run powerpc binaries on x64 host +FROM debian:sid-20260406 + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# 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 \ + binfmt-support \ + gpg \ + ca-certificates \ + cmake \ + make \ + ninja-build \ + git \ + wget \ + file \ + debian-ports-archive-keyring \ + && rm -rf /var/lib/apt/lists/* + +RUN cat < /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 < /etc/apt/sources.list.d/powerpc.sources +Types: deb +URIs: http://snapshot.debian.org/archive/debian-ports/20260406T000000Z +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 \ + gcc-powerpc-linux-gnu \ + g++-powerpc-linux-gnu \ + libc6:powerpc \ + libstdc++6:powerpc \ + libatomic1:powerpc \ + && rm -rf /var/lib/apt/lists/* + +# Create non-root user with stable UID/GID +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=1000 + +RUN groupadd --gid ${USER_GID} ${USERNAME} && \ + useradd --uid ${USER_UID} --gid ${USER_GID} --shell /bin/bash --create-home ${USERNAME} + +# Set working directory +WORKDIR /workspaces/etl + +# Install Bazelisk as 'bazel' +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + wget -qO /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH} && \ + chmod +x /usr/local/bin/bazel + +# Verify QEMU and cross-compilation setup +RUN echo "=== Host Architecture ===" && \ + uname -m && \ + echo "" && \ + echo "=== powerpc Cross Compiler ===" && \ + powerpc-linux-gnu-gcc --version && \ + echo "" && \ + echo "=== QEMU powerpc ===" && \ + qemu-ppc-static --version | head -n1 + +# Ensure workspace directory ownership for non-root user +RUN mkdir -p /workspaces/etl && chown -R ${USERNAME}:${USERNAME} /workspaces + +# Switch to non-root user +USER ${USERNAME} + +# Default command +CMD ["/bin/bash"] diff --git a/.devcontainer/powerpc/devcontainer.json b/.devcontainer/powerpc/devcontainer.json new file mode 100644 index 00000000..1d7a9a05 --- /dev/null +++ b/.devcontainer/powerpc/devcontainer.json @@ -0,0 +1,29 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "powerpc (Debian)", + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools" + ], + "settings": { + "cmake.sourceDirectory": "${workspaceFolder}/test", + "cmake.configureArgs": [ + "-DCMAKE_TOOLCHAIN_FILE=${workspaceFolder}/.devcontainer/powerpc/toolchain-powerpc.cmake", + "-DBUILD_TESTS=ON", + "-DNO_STL=ON", + "-DETL_CXX_STANDARD=23" + ], + "cmake.buildDirectory": "${workspaceFolder}/build-powerpc", + "cmake.generator": "Ninja" + } + } + }, + "remoteUser": "root" +} diff --git a/.devcontainer/powerpc/toolchain-powerpc.cmake b/.devcontainer/powerpc/toolchain-powerpc.cmake new file mode 100644 index 00000000..1afea7da --- /dev/null +++ b/.devcontainer/powerpc/toolchain-powerpc.cmake @@ -0,0 +1,21 @@ +# CMake toolchain file for powerpc cross-compilation +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR powerpc) + +# Specify the cross compiler +set(CMAKE_C_COMPILER powerpc-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER powerpc-linux-gnu-g++) +set(CMAKE_AR powerpc-linux-gnu-ar) +set(CMAKE_RANLIB powerpc-linux-gnu-ranlib) +set(CMAKE_STRIP powerpc-linux-gnu-strip) + +# Search for programs in the build host directories +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# For libraries and headers in the target directories +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +# Set QEMU for running tests +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-ppc CACHE FILEPATH "Path to the emulator for cross-compiled binaries") diff --git a/.devcontainer/riscv64/Dockerfile b/.devcontainer/riscv64/Dockerfile new file mode 100644 index 00000000..90a95a4c --- /dev/null +++ b/.devcontainer/riscv64/Dockerfile @@ -0,0 +1,61 @@ +# riscv64 Test Environment for ETL +# Uses QEMU user-mode emulation to run riscv64 binaries on x64 host +FROM debian:trixie + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# Install QEMU user-mode emulation and riscv64 cross-compilation tools +RUN dpkg --add-architecture riscv64 && \ + apt-get update && apt-get install -y --no-install-recommends \ + qemu-user-static \ + qemu-user \ + binfmt-support \ + gcc-riscv64-linux-gnu \ + g++-riscv64-linux-gnu \ + cmake \ + make \ + ninja-build \ + git \ + wget \ + ca-certificates \ + file \ + libc6:riscv64 \ + libstdc++6:riscv64 \ + libatomic1:riscv64 \ + && rm -rf /var/lib/apt/lists/* + +# Create non-root user with stable UID/GID +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=1000 + +RUN groupadd --gid ${USER_GID} ${USERNAME} && \ + useradd --uid ${USER_UID} --gid ${USER_GID} --shell /bin/bash --create-home ${USERNAME} + +# Set working directory +WORKDIR /workspaces/etl + +# Install Bazelisk as 'bazel' +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + wget -qO /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH} && \ + chmod +x /usr/local/bin/bazel + +# Verify QEMU and cross-compilation setup +RUN echo "=== Host Architecture ===" && \ + uname -m && \ + echo "" && \ + echo "=== riscv64 Cross Compiler ===" && \ + riscv64-linux-gnu-gcc --version && \ + echo "" && \ + echo "=== QEMU riscv64 ===" && \ + qemu-riscv64-static --version | head -n1 + +# Ensure workspace directory ownership for non-root user +RUN mkdir -p /workspaces/etl && chown -R ${USERNAME}:${USERNAME} /workspaces + +# Switch to non-root user +USER ${USERNAME} + +# Default command +CMD ["/bin/bash"] diff --git a/.devcontainer/riscv64/devcontainer.json b/.devcontainer/riscv64/devcontainer.json new file mode 100644 index 00000000..0e673f24 --- /dev/null +++ b/.devcontainer/riscv64/devcontainer.json @@ -0,0 +1,29 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "riscv64 (Debian)", + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools" + ], + "settings": { + "cmake.sourceDirectory": "${workspaceFolder}/test", + "cmake.configureArgs": [ + "-DCMAKE_TOOLCHAIN_FILE=${workspaceFolder}/.devcontainer/riscv64/toolchain-riscv64.cmake", + "-DBUILD_TESTS=ON", + "-DNO_STL=OFF", + "-DETL_CXX_STANDARD=23" + ], + "cmake.buildDirectory": "${workspaceFolder}/build-riscv64", + "cmake.generator": "Ninja" + } + } + }, + "remoteUser": "root" +} diff --git a/.devcontainer/riscv64/toolchain-riscv64.cmake b/.devcontainer/riscv64/toolchain-riscv64.cmake new file mode 100644 index 00000000..adc1c7f3 --- /dev/null +++ b/.devcontainer/riscv64/toolchain-riscv64.cmake @@ -0,0 +1,20 @@ +# CMake toolchain file for riscv64 cross-compilation +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR riscv64) + +# Specify the cross compiler +set(CMAKE_C_COMPILER riscv64-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER riscv64-linux-gnu-g++) +set(CMAKE_AR riscv64-linux-gnu-ar) +set(CMAKE_RANLIB riscv64-linux-gnu-ranlib) +set(CMAKE_STRIP riscv64-linux-gnu-strip) +# Search for programs in the build host directories +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# For libraries and headers in the target directories +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +# Set QEMU for running tests +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-riscv64-static CACHE FILEPATH "Path to the emulator for cross-compiled binaries") diff --git a/.devcontainer/run-tests.sh b/.devcontainer/run-tests.sh new file mode 100755 index 00000000..9618a15b --- /dev/null +++ b/.devcontainer/run-tests.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# Run tests inside the separately created docker container for different hardware architecture +# +# Strategy: +# * Create docker image +# * Enter image +# * Cross build tests +# * Run tests via QEMU +# + +set -e + +usage() +{ + echo "Usage: run-tests.sh " + echo "Architecture: armhf|i386|powerpc|riscv64|s390x" + echo "(run from project root)" +} + +ARCHLIST="armhf i386 powerpc riscv64 s390x" + +if [[ " $ARCHLIST " =~ " $1 " ]] ; then + ARCH=$1 +else + echo "Unsupported architecture: $1" + usage + exit 1 +fi + +if [ "$2" = "" ] ; then + echo "Creating docker image..." + docker build -t $ARCH .devcontainer/$ARCH + + echo "Entering container..." + docker run -it --rm -v "$PWD":/workspaces/etl -w /workspaces/etl $ARCH /bin/bash .devcontainer/run-tests.sh $ARCH inside_container + +elif [ "$2" = "inside_container" ] ; then + echo "Cross building tests..." + mkdir -p build-$ARCH + cd build-$ARCH + cmake -DCMAKE_TOOLCHAIN_FILE=../.devcontainer/$ARCH/toolchain-$ARCH.cmake \ + -DBUILD_TESTS=ON -DNO_STL=ON -DETL_CXX_STANDARD=23 \ + -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=-O0 -DETL_ENABLE_SANITIZER=OFF -DETL_MESSAGES_ARE_NOT_VIRTUAL=OFF \ + ../test + export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) + cmake --build . + + echo "Running tests via CTest (using QEMU emulator from toolchain)..." + ctest -V --output-on-failure + echo "Tests successful." +else + echo "Invalid second argument: $2" + usage + exit 1 +fi diff --git a/.devcontainer/s390x/Dockerfile b/.devcontainer/s390x/Dockerfile new file mode 100644 index 00000000..536f2de4 --- /dev/null +++ b/.devcontainer/s390x/Dockerfile @@ -0,0 +1,61 @@ +# s390x Big-Endian Test Environment for ETL +# Uses QEMU user-mode emulation to run s390x binaries on x64 host +FROM debian:trixie + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# Install QEMU user-mode emulation and s390x cross-compilation tools +RUN dpkg --add-architecture s390x && \ + apt-get update && apt-get install -y --no-install-recommends \ + qemu-user-static \ + qemu-user \ + binfmt-support \ + gcc-s390x-linux-gnu \ + g++-s390x-linux-gnu \ + cmake \ + make \ + ninja-build \ + git \ + wget \ + ca-certificates \ + file \ + libc6:s390x \ + libstdc++6:s390x \ + libatomic1:s390x \ + && rm -rf /var/lib/apt/lists/* + +# Create non-root user with stable UID/GID +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=1000 + +RUN groupadd --gid ${USER_GID} ${USERNAME} && \ + useradd --uid ${USER_UID} --gid ${USER_GID} --shell /bin/bash --create-home ${USERNAME} + +# Set working directory +WORKDIR /workspaces/etl + +# Install Bazelisk as 'bazel' +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + wget -qO /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH} && \ + chmod +x /usr/local/bin/bazel + +# Verify QEMU and cross-compilation setup +RUN echo "=== Host Architecture ===" && \ + uname -m && \ + echo "" && \ + echo "=== s390x Cross Compiler ===" && \ + s390x-linux-gnu-gcc --version && \ + echo "" && \ + echo "=== QEMU s390x ===" && \ + qemu-s390x-static --version | head -n1 + +# Ensure workspace directory ownership for non-root user +RUN mkdir -p /workspaces/etl && chown -R ${USERNAME}:${USERNAME} /workspaces + +# Switch to non-root user +USER ${USERNAME} + +# Default command +CMD ["/bin/bash"] diff --git a/.devcontainer/s390x/devcontainer.json b/.devcontainer/s390x/devcontainer.json new file mode 100644 index 00000000..535a0799 --- /dev/null +++ b/.devcontainer/s390x/devcontainer.json @@ -0,0 +1,29 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "s390x Big Endian (Debian)", + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools" + ], + "settings": { + "cmake.sourceDirectory": "${workspaceFolder}/test", + "cmake.configureArgs": [ + "-DCMAKE_TOOLCHAIN_FILE=${workspaceFolder}/.devcontainer/s390x/toolchain-s390x.cmake", + "-DBUILD_TESTS=ON", + "-DNO_STL=OFF", + "-DETL_CXX_STANDARD=23" + ], + "cmake.buildDirectory": "${workspaceFolder}/build-s390x", + "cmake.generator": "Ninja" + } + } + }, + "remoteUser": "root" +} diff --git a/.devcontainer/s390x/toolchain-s390x.cmake b/.devcontainer/s390x/toolchain-s390x.cmake new file mode 100644 index 00000000..706884d9 --- /dev/null +++ b/.devcontainer/s390x/toolchain-s390x.cmake @@ -0,0 +1,21 @@ +# CMake toolchain file for s390x cross-compilation +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR s390x) + +# Specify the cross compiler +set(CMAKE_C_COMPILER s390x-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER s390x-linux-gnu-g++) +set(CMAKE_AR s390x-linux-gnu-ar) +set(CMAKE_RANLIB s390x-linux-gnu-ranlib) +set(CMAKE_STRIP s390x-linux-gnu-strip) + +# Search for programs in the build host directories +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# For libraries and headers in the target directories +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +# Set QEMU for running tests +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-s390x-static CACHE FILEPATH "Path to the emulator for cross-compiled binaries") diff --git a/.devcontainer/ubuntu-26.04/Dockerfile b/.devcontainer/ubuntu-26.04/Dockerfile new file mode 100644 index 00000000..ddd21706 --- /dev/null +++ b/.devcontainer/ubuntu-26.04/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:26.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + git \ + ninja-build \ + python3 \ + python3-pip \ + clang \ + docker.io \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd -m -s /bin/bash vscode + +WORKDIR /etl + +CMD ["/bin/bash"] diff --git a/.github/workflows/bazel-gcc-c++23-no-stl.yml b/.github/workflows/bazel-gcc-c++23-no-stl.yml new file mode 100644 index 00000000..b41765a2 --- /dev/null +++ b/.github/workflows/bazel-gcc-c++23-no-stl.yml @@ -0,0 +1,22 @@ +name: bazel-gcc-c++23-no-stl +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-bazel-gcc-cpp23-no-stl: + name: Bazel GCC C++23 Linux - No STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: bazel build //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL + + - name: Run tests + run: bazel test //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL --test_output=all diff --git a/.github/workflows/clang-c++11.yml b/.github/workflows/clang-c++11.yml index 2e243e80..edf2f2e5 100644 --- a/.github/workflows/clang-c++11.yml +++ b/.github/workflows/clang-c++11.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -24,10 +25,39 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v + + build-clang-cpp11-linux-stl-libcxx: + name: Clang C++11 Linux - STL - libc++ + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Install libc++ + run: | + sudo apt-get update + sudo apt-get install -y libc++-dev libc++abi-dev + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export CXXFLAGS="-stdlib=libc++" + export LDFLAGS="-stdlib=libc++" + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v build-clang-cpp11-linux-no-stl: name: Clang C++11 Linux - No STL @@ -46,7 +76,7 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests \ No newline at end of file + run: ./test/etl_tests -v \ No newline at end of file diff --git a/.github/workflows/clang-c++14.yml b/.github/workflows/clang-c++14.yml index 7d2338d3..b11f3407 100644 --- a/.github/workflows/clang-c++14.yml +++ b/.github/workflows/clang-c++14.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -24,10 +25,39 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v + + build-clang-cpp14-linux-stl-libcxx: + name: Clang C++14 Linux - STL - libc++ + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Install libc++ + run: | + sudo apt-get update + sudo apt-get install -y libc++-dev libc++abi-dev + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export CXXFLAGS="-stdlib=libc++" + export LDFLAGS="-stdlib=libc++" + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v build-clang-cpp14-linux-no-stl: name: Clang C++14 Linux - No STL @@ -46,7 +76,7 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests \ No newline at end of file + run: ./test/etl_tests -v \ No newline at end of file diff --git a/.github/workflows/clang-c++17.yml b/.github/workflows/clang-c++17.yml index 62afaf42..917d8da0 100644 --- a/.github/workflows/clang-c++17.yml +++ b/.github/workflows/clang-c++17.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -24,10 +25,39 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v + + build-clang-cpp17-linux-stl-libcxx: + name: Clang C++17 Linux - STL - libc++ + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + - name: Install libc++ + run: | + sudo apt-get update + sudo apt-get install -y libc++-dev libc++abi-dev + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export CXXFLAGS="-stdlib=libc++" + export LDFLAGS="-stdlib=libc++" + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v build-clang-cpp17-linux-no-stl: name: Clang C++17 Linux - No STL @@ -46,7 +76,7 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests \ No newline at end of file + run: ./test/etl_tests -v \ No newline at end of file diff --git a/.github/workflows/clang-c++20.yml b/.github/workflows/clang-c++20.yml index e403e5c0..681d03c0 100644 --- a/.github/workflows/clang-c++20.yml +++ b/.github/workflows/clang-c++20.yml @@ -3,10 +3,45 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: + build-clang-cpp20-linux-stl-libcxx: + name: Clang C++20 Linux - STL - libc++ + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + + steps: + - uses: actions/checkout@v4 + + # Temporary fix. See https://github.com/actions/runner-images/issues/8659 + - name: Install newer Clang + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x ./llvm.sh + sudo ./llvm.sh 17 + + - name: Install libc++ + run: sudo apt-get install -y libc++-17-dev libc++abi-17-dev + + - name: Build + run: | + export CC=clang-17 + export CXX=clang++-17 + export CXXFLAGS="-stdlib=libc++" + export LDFLAGS="-stdlib=libc++" + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./ + clang-17 --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v + build-clang-cpp20-linux-no-stl: name: Clang C++20 Linux - No STL runs-on: ${{ matrix.os }} @@ -31,10 +66,10 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./ clang-17 --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp20-linux-stl-force-cpp03: name: Clang C++20 Linux - STL - Force C++03 @@ -60,10 +95,10 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./ clang-17 --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp20-linux-no-stl-force-cpp03: name: Clang C++20 Linux - No STL - Force C++03 @@ -89,17 +124,17 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./ clang-17 --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp20-osx-stl: name: Clang C++20 OSX - STL runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -111,17 +146,17 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp20-osx-no-stl: name: Clang C++20 OSX - No STL runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -133,17 +168,17 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp20-osx-stl-force-cpp03: name: Clang C++20 OSX - STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -155,17 +190,17 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp20-osx-no-stl-force-cpp03: name: Clang C++20 OSX - No STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -177,8 +212,8 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v diff --git a/.github/workflows/clang-c++23.yml b/.github/workflows/clang-c++23.yml index 82c4a16d..2cdb909d 100644 --- a/.github/workflows/clang-c++23.yml +++ b/.github/workflows/clang-c++23.yml @@ -3,103 +3,112 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: + build-clang-cpp23-linux-stl-libcxx: + name: Clang C++23 Linux - STL - libc++ + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-24.04] + + steps: + - uses: actions/checkout@v4 + + - name: Install libc++ + run: | + sudo apt-get update + sudo apt-get install -y libc++-dev libc++abi-dev + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export CXXFLAGS="-stdlib=libc++" + export LDFLAGS="-stdlib=libc++" + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v + build-clang-cpp23-linux-no-stl: name: Clang C++23 Linux - No STL runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] steps: - uses: actions/checkout@v4 - # Temporary fix. See https://github.com/actions/runner-images/issues/8659 - - name: Install newer Clang - run: | - wget https://apt.llvm.org/llvm.sh - chmod +x ./llvm.sh - sudo ./llvm.sh 17 - - name: Build run: | - export CC=clang-17 - export CXX=clang++-17 + export CC=clang + export CXX=clang++ export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 - cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ - clang-17 --version - make -j $(getconf _NPROCESSORS_ONLN) + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp23-linux-stl-force-cpp03: name: Clang C++23 Linux - STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] steps: - uses: actions/checkout@v4 - # Temporary fix. See https://github.com/actions/runner-images/issues/8659 - - name: Install newer Clang - run: | - wget https://apt.llvm.org/llvm.sh - chmod +x ./llvm.sh - sudo ./llvm.sh 17 - - name: Build run: | - export CC=clang-17 - export CXX=clang++-17 + export CC=clang + export CXX=clang++ export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 - cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ - clang-17 --version - make -j $(getconf _NPROCESSORS_ONLN) + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp2-linux-no-stl-force-cpp03: name: Clang C++23 Linux - No STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] steps: - uses: actions/checkout@v4 - # Temporary fix. See https://github.com/actions/runner-images/issues/8659 - - name: Install newer Clang - run: | - wget https://apt.llvm.org/llvm.sh - chmod +x ./llvm.sh - sudo ./llvm.sh 17 - - name: Build run: | - export CC=clang-17 - export CXX=clang++-17 + export CC=clang + export CXX=clang++ export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 - cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ - clang-17 --version - make -j $(getconf _NPROCESSORS_ONLN) + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp23-osx-stl: name: Clang C++23 OSX - STL runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -109,19 +118,19 @@ jobs: export CC=clang export CXX=clang++ export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 - cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp23-osx-no-stl: name: Clang C++23 OSX - No STL runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -131,19 +140,19 @@ jobs: export CC=clang export CXX=clang++ export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 - cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp23-osx-stl-force-cpp03: name: Clang C++23 OSX - STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -153,19 +162,19 @@ jobs: export CC=clang export CXX=clang++ export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 - cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-clang-cpp23-osx-no-stl-force-cpp03: name: Clang C++23 OSX - No STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-15] steps: - uses: actions/checkout@v4 @@ -175,10 +184,10 @@ jobs: export CC=clang export CXX=clang++ export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 - cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v diff --git a/.github/workflows/clang-c++26.yml b/.github/workflows/clang-c++26.yml new file mode 100644 index 00000000..61dc931f --- /dev/null +++ b/.github/workflows/clang-c++26.yml @@ -0,0 +1,210 @@ +name: clang-c++26 +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-clang-cpp26-linux-stl-libcxx: + name: Clang C++26 Linux - STL - libc++ + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + apt-get update && apt-get install -y libc++-dev libc++abi-dev && \ + export CC=clang && \ + export CXX=clang++ && \ + export CXXFLAGS=-stdlib=libc++ && \ + export LDFLAGS=-stdlib=libc++ && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \ + clang --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-clang-cpp26-linux-stl: + name: Clang C++26 Linux - STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \ + clang --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-clang-cpp26-linux-no-stl: + name: Clang C++26 Linux - No STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \ + clang --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-clang-cpp26-linux-stl-force-cpp03: + name: Clang C++26 Linux - STL - Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \ + clang --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-clang-cpp26-linux-no-stl-force-cpp03: + name: Clang C++26 Linux - No STL - Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \ + clang --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-clang-cpp26-osx-stl: + name: Clang C++26 OSX - STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-26] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v + + build-clang-cpp26-osx-no-stl: + name: Clang C++26 OSX - No STL + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-26] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v + + build-clang-cpp26-osx-stl-force-cpp03: + name: Clang C++26 OSX - STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-26] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v + + build-clang-cpp26-osx-no-stl-force-cpp03: + name: Clang C++26 OSX - No STL - Force C++03 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-26] + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + export CC=clang + export CXX=clang++ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 + cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ + clang --version + make -j "$(getconf _NPROCESSORS_ONLN)" + + - name: Run tests + run: ./test/etl_tests -v diff --git a/.github/workflows/clang-format.yaml b/.github/workflows/clang-format.yaml new file mode 100644 index 00000000..083f265f --- /dev/null +++ b/.github/workflows/clang-format.yaml @@ -0,0 +1,43 @@ +name: clang-format + +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + clang-format: + name: clang-format + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install clang-format and git + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends git clang-format + clang-format --version + + - name: Run clang-format on added/changed files + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + BEFORE="origin/${{ github.base_ref }}" + elif [ "${{ github.event_name }}" = "push" ]; then + BEFORE="${{ github.event.before }}" + else + echo "Unsupported event: ${{ github.event_name }}" + echo "This is likely a bug in the workflow configuration. Please report it to the maintainers." + exit 1 + fi + + git diff --name-only -z --diff-filter=AMCR "$BEFORE"..HEAD -- \ + '*.c' '*.cc' '*.cxx' '*.cpp' \ + '*.h' '*.hh' '*.hpp' '*.hxx' \ + '*.ipp' '*.inl' \ + ':(exclude)include/etl/generators/*' \ + ':(exclude)include/etl/private/*_cpp03.h' \ + | xargs -0 --no-run-if-empty clang-format --Werror -n --style=file diff --git a/.github/workflows/clang-format_update.yaml b/.github/workflows/clang-format_update.yaml new file mode 100644 index 00000000..acaa3453 --- /dev/null +++ b/.github/workflows/clang-format_update.yaml @@ -0,0 +1,21 @@ +name: clang-format-update + +on: + workflow_dispatch: + +jobs: + clang-format: + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install clang-format + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends clang-format + clang-format --version + + - name: Run clang-format + run: | + find . \( -name '*.cpp' -o -name '*.h' -o -name '*.c' \) | xargs clang-format --dry-run --Werror diff --git a/.github/workflows/clang-syntax-checks.yml b/.github/workflows/clang-syntax-checks.yml index c0c5f4e2..2c6000e7 100644 --- a/.github/workflows/clang-syntax-checks.yml +++ b/.github/workflows/clang-syntax-checks.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: build-clang-cpp03-linux-STL: @@ -22,10 +23,10 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp03-linux-No-STL: - name: Syntax Check - Clang C++03 Linux No STL + name: Syntax Check - Clang C++03 Linux No STL runs-on: ${{ matrix.os }} strategy: matrix: @@ -40,7 +41,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp11-linux-STL: name: Syntax Check - Clang C++11 Linux STL @@ -58,10 +59,10 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp11-linux-No-STL: - name: Syntax Check - Clang C++11 Linux No STL + name: Syntax Check - Clang C++11 Linux No STL runs-on: ${{ matrix.os }} strategy: matrix: @@ -76,7 +77,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp11-linux-STL-Force-CPP03: name: Syntax Check - Clang C++11 Linux STL Force C++03 @@ -94,7 +95,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp11-linux-No-STL-Force-CPP03: name: Syntax Check - Clang C++11 Linux No STL Force C++03 @@ -112,7 +113,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp14-linux-STL: name: Syntax Check - Clang C++14 Linux STL @@ -130,10 +131,10 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp14-linux-No-STL: - name: Syntax Check - Clang C++14 Linux No STL + name: Syntax Check - Clang C++14 Linux No STL runs-on: ${{ matrix.os }} strategy: matrix: @@ -148,7 +149,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp14-linux-STL-Force-CPP03: name: Syntax Check - Clang C++14 Linux STL Force C++03 @@ -166,7 +167,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp14-linux-No-STL-Force-CPP03: name: Syntax Check - Clang C++14 Linux No STL Force C++03 @@ -184,7 +185,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp17-linux-STL: name: Syntax Check - Clang C++17 Linux STL @@ -202,10 +203,10 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp17-linux-No-STL: - name: Syntax Check - Clang C++17 Linux No STL + name: Syntax Check - Clang C++17 Linux No STL runs-on: ${{ matrix.os }} strategy: matrix: @@ -220,7 +221,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp17-linux-STL-Force-CPP03: name: Syntax Check - Clang C++17 Linux STL Force C++03 @@ -238,7 +239,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp17-linux-No-STL-Force-CPP03: name: Syntax Check - Clang C++17 Linux No STL Force C++03 @@ -256,7 +257,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp20-linux-STL: name: Syntax Check - Clang C++20 Linux STL @@ -274,10 +275,10 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp20-linux-No-STL: - name: Syntax Check - Clang C++20 Linux No STL + name: Syntax Check - Clang C++20 Linux No STL runs-on: ${{ matrix.os }} strategy: matrix: @@ -292,7 +293,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp20-linux-STL-Force-CPP03: name: Syntax Check - Clang C++20 Linux STL Force C++03 @@ -310,7 +311,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp20-linux-No-STL-Force-CPP03: name: Syntax Check - Clang C++20 Linux No STL Force C++03 @@ -328,7 +329,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp23-linux-STL: name: Syntax Check - Clang C++23 Linux STL @@ -346,10 +347,10 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp23-linux-No-STL: - name: Syntax Check - Clang C++23 Linux No STL + name: Syntax Check - Clang C++23 Linux No STL runs-on: ${{ matrix.os }} strategy: matrix: @@ -364,7 +365,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp23-linux-STL-Force-CPP03: name: Syntax Check - Clang C++23 Linux STL Force C++03 @@ -382,7 +383,7 @@ jobs: export CXX=clang++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-clang-cpp23-linux-No-STL-Force-CPP03: name: Syntax Check - Clang C++23 Linux No STL Force C++03 @@ -400,4 +401,84 @@ jobs: export CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check clang --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" + + build-clang-cpp26-linux-STL: + name: Syntax Check - Clang C++26 Linux STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + clang++ --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" + + build-clang-cpp26-linux-No-STL: + name: Syntax Check - Clang C++26 Linux No STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + clang++ --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" + + build-clang-cpp26-linux-STL-Force-CPP03: + name: Syntax Check - Clang C++26 Linux STL Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + clang++ --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" + + build-clang-cpp26-linux-No-STL-Force-CPP03: + name: Syntax Check - Clang C++26 Linux No STL Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=clang && \ + export CXX=clang++ && \ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + clang++ --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" diff --git a/.github/workflows/clang-tidy.yaml b/.github/workflows/clang-tidy.yaml new file mode 100644 index 00000000..214d30b2 --- /dev/null +++ b/.github/workflows/clang-tidy.yaml @@ -0,0 +1,29 @@ +name: clang-tidy + +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + clang-tidy: + name: clang-tidy + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends clang clang-tidy + clang --version + clang-tidy --version + run-clang-tidy --version || true + + - name: Run clang-tidy + run: | + test/run-clang-tidy.sh diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..5c05ebef --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,68 @@ +name: coverage + +on: + push: + branches: [ master, pull-request/* ] + pull_request: + branches: [ master, pull-request/* ] + types: [opened, synchronize, reopened] + +# Allow only one concurrent deployment to GitHub Pages +concurrency: + group: coverage-${{ github.ref }} + cancel-in-progress: true + +# Grant GITHUB_TOKEN the minimum permissions needed at the workflow level +permissions: + contents: read + +jobs: + + coverage: + name: Generate Coverage Report + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y lcov llvm gcc g++ clang cmake + + - name: Build, test, and collect coverage + run: | + cd test + ./run-coverage.sh + + - name: Upload coverage report artifact + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: test/build-coverage/coverage/ + retention-days: 30 + + - name: Upload Pages artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + uses: actions/upload-pages-artifact@v3 + with: + path: test/build-coverage/coverage/ + + deploy-pages: + name: Deploy to GitHub Pages + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: coverage + runs-on: ubuntu-22.04 + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/deploy-etl-documentation.yml b/.github/workflows/deploy-etl-documentation.yml new file mode 100644 index 00000000..b7636de1 --- /dev/null +++ b/.github/workflows/deploy-etl-documentation.yml @@ -0,0 +1,44 @@ +name: Deploy documentation via SFTP + +on: + push: + branches: [ master ] + +jobs: + deploy: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./hugo + + steps: + # Check out the repository code + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + # Install and set up Hugo + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: 'latest' + extended: true + + # Build the static site + - name: Build Hugo Site + run: hugo --cleanDestinationDir --minify --baseURL "https://www.etlcpp.com/" + + # Upload the files via rsync. + - name: Deploy via rsync + uses: burnett01/rsync-deployments@8.0.5 + with: + switches: -avzr --delete + path: hugo/public/ + remote_path: ${{ secrets.DOCS_DEST_DIR }} + remote_host: ${{ secrets.DOCS_SSH_SERVER }} + remote_port: ${{ secrets.DOCS_SSH_PORT }} + remote_user: ${{ secrets.DOCS_SSH_USER }} + remote_key: ${{ secrets.DOCS_DEPLOY_KEY }} diff --git a/.github/workflows/gcc-c++11.yml b/.github/workflows/gcc-c++11.yml index f4cea1b3..c9706aeb 100644 --- a/.github/workflows/gcc-c++11.yml +++ b/.github/workflows/gcc-c++11.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -25,10 +26,10 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp11-linux-no-stl: name: GCC C++11 Linux - No STL @@ -48,7 +49,7 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v diff --git a/.github/workflows/gcc-c++14.yml b/.github/workflows/gcc-c++14.yml index a24f9312..a3277b66 100644 --- a/.github/workflows/gcc-c++14.yml +++ b/.github/workflows/gcc-c++14.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -24,10 +25,10 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp14-linux-no-stl: name: GCC C++14 Linux - No STL @@ -46,7 +47,7 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests \ No newline at end of file + run: ./test/etl_tests -v \ No newline at end of file diff --git a/.github/workflows/gcc-c++17.yml b/.github/workflows/gcc-c++17.yml index f16538ff..dbeef7fa 100644 --- a/.github/workflows/gcc-c++17.yml +++ b/.github/workflows/gcc-c++17.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -24,10 +25,10 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp17-linux-no-stl: name: GCC C++17 Linux - No STL @@ -46,7 +47,7 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v diff --git a/.github/workflows/gcc-c++20.yml b/.github/workflows/gcc-c++20.yml index 35de10cf..be4e6fb2 100644 --- a/.github/workflows/gcc-c++20.yml +++ b/.github/workflows/gcc-c++20.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -24,10 +25,10 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp20-linux-no-stl: name: GCC C++20 Linux - No STL @@ -46,10 +47,10 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp20-linux-stl-force-cpp03: name: GCC C++20 Linux - STL - Force C++03 @@ -68,10 +69,10 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp20-linux-no-stl-force-cpp03: name: GCC C++20 Linux - No STL - Force C++03 @@ -90,7 +91,7 @@ jobs: export CXX=g++ cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests \ No newline at end of file + run: ./test/etl_tests -v \ No newline at end of file diff --git a/.github/workflows/gcc-c++23-armhf.yml b/.github/workflows/gcc-c++23-armhf.yml new file mode 100644 index 00000000..1bd2912b --- /dev/null +++ b/.github/workflows/gcc-c++23-armhf.yml @@ -0,0 +1,29 @@ +name: gcc-c++23-armhf +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-gcc-cpp23-linux-no-stl-armhf: + name: GCC C++23 Linux - No STL - armhf + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-armhf -f .devcontainer/armhf/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-armhf bash -c "\ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \ + -DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/armhf/toolchain-armhf.cmake \ + -DEXTRA_TESTING_FLAGS=-v \ + ./ && \ + cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \ + ctest -V" diff --git a/.github/workflows/gcc-c++23-i386.yml b/.github/workflows/gcc-c++23-i386.yml new file mode 100644 index 00000000..31bfc331 --- /dev/null +++ b/.github/workflows/gcc-c++23-i386.yml @@ -0,0 +1,29 @@ +name: gcc-c++23-i386 +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-gcc-cpp23-linux-no-stl-i386: + name: GCC C++23 Linux - No STL - i386 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-i386 -f .devcontainer/i386/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-i386 bash -c "\ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \ + -DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/i386/toolchain-i386.cmake \ + -DEXTRA_TESTING_FLAGS=-v \ + ./ && \ + cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \ + ctest -V" diff --git a/.github/workflows/gcc-c++23-powerpc.yml b/.github/workflows/gcc-c++23-powerpc.yml new file mode 100644 index 00000000..7494ae55 --- /dev/null +++ b/.github/workflows/gcc-c++23-powerpc.yml @@ -0,0 +1,29 @@ +name: gcc-c++23-powerpc +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-gcc-cpp23-linux-no-stl-powerpc: + name: GCC C++23 Linux - No STL - powerpc + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-powerpc -f .devcontainer/powerpc/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-powerpc bash -c "\ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \ + -DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/powerpc/toolchain-powerpc.cmake \ + -DEXTRA_TESTING_FLAGS=-v \ + ./ && \ + cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \ + ctest -V" diff --git a/.github/workflows/gcc-c++23-riscv64.yml b/.github/workflows/gcc-c++23-riscv64.yml new file mode 100644 index 00000000..695056a8 --- /dev/null +++ b/.github/workflows/gcc-c++23-riscv64.yml @@ -0,0 +1,29 @@ +name: gcc-c++23-riscv64 +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-gcc-cpp23-linux-no-stl-riscv64: + name: GCC C++23 Linux - No STL - riscv64 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-riscv64 -f .devcontainer/riscv64/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-riscv64 bash -c "\ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \ + -DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/riscv64/toolchain-riscv64.cmake \ + -DEXTRA_TESTING_FLAGS=-v \ + ./ && \ + cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \ + ctest -V" diff --git a/.github/workflows/gcc-c++23-s390x.yml b/.github/workflows/gcc-c++23-s390x.yml new file mode 100644 index 00000000..f6a15aca --- /dev/null +++ b/.github/workflows/gcc-c++23-s390x.yml @@ -0,0 +1,29 @@ +name: gcc-c++23-s390x +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-gcc-cpp23-linux-no-stl-s390x: + name: GCC C++23 Linux - No STL - s390x + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-s390x -f .devcontainer/s390x/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-s390x bash -c "\ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \ + -DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/s390x/toolchain-s390x.cmake \ + -DEXTRA_TESTING_FLAGS=-v \ + ./ && \ + cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \ + ctest -V" diff --git a/.github/workflows/gcc-c++23.yml b/.github/workflows/gcc-c++23.yml index 93881f84..9ca6baf0 100644 --- a/.github/workflows/gcc-c++23.yml +++ b/.github/workflows/gcc-c++23.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: @@ -12,7 +13,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] steps: - uses: actions/checkout@v4 @@ -22,19 +23,19 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 export CC=gcc export CXX=g++ - cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp23-linux-no-stl: name: GCC C++23 Linux - No STL runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] steps: - uses: actions/checkout@v4 @@ -44,19 +45,19 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 export CC=gcc export CXX=g++ - cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=23 ./ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp23-linux-stl-force-cpp03: name: GCC C++23 Linux - STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] steps: - uses: actions/checkout@v4 @@ -66,19 +67,19 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 export CC=gcc export CXX=g++ - cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests + run: ./test/etl_tests -v build-gcc-cpp23-linux-no-stl-force-cpp03: name: GCC C++23 Linux - No STL - Force C++03 runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] steps: - uses: actions/checkout@v4 @@ -88,9 +89,9 @@ jobs: export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 export CC=gcc export CXX=g++ - cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=23 ./ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 -DETL_OPTIMISATION=-O3 ./ gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" - name: Run tests - run: ./test/etl_tests \ No newline at end of file + run: ./test/etl_tests -v \ No newline at end of file diff --git a/.github/workflows/gcc-c++26.yml b/.github/workflows/gcc-c++26.yml new file mode 100644 index 00000000..b7ff42d3 --- /dev/null +++ b/.github/workflows/gcc-c++26.yml @@ -0,0 +1,97 @@ +name: gcc-c++26 +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-gcc-cpp26-linux-stl: + name: GCC C++26 Linux - STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-gcc-cpp26-linux-no-stl: + name: GCC C++26 Linux - No STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./ && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-gcc-cpp26-linux-stl-force-cpp03: + name: GCC C++26 Linux - STL - Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" + + build-gcc-cpp26-linux-no-stl-force-cpp03: + name: GCC C++26 Linux - No STL - Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build and run tests + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0 && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./ && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN) && \ + ./test/etl_tests -v" diff --git a/.github/workflows/gcc-syntax-checks.yml b/.github/workflows/gcc-syntax-checks.yml index 106d6d3b..b6b77bad 100644 --- a/.github/workflows/gcc-syntax-checks.yml +++ b/.github/workflows/gcc-syntax-checks.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: build-gcc-cpp03-linux-STL: @@ -22,10 +23,10 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp03-linux-No-STL: - name: Syntax Check - GCC C++03 Linux No STL + name: Syntax Check - GCC C++03 Linux No STL runs-on: ${{ matrix.os }} strategy: matrix: @@ -40,7 +41,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=03 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp11-linux-STL: name: Syntax Check - GCC C++11 Linux STL @@ -58,7 +59,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp11-linux-No-STL: name: Syntax Check - GCC C++11 Linux No STL @@ -76,7 +77,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp11-linux-STL-Force-CPP03: name: Syntax Check - GCC C++11 Linux STL Force C++03 @@ -94,7 +95,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp11-linux-No-STL-Force-CPP03: name: Syntax Check - GCC C++11 Linux No STL Force C++03 @@ -112,7 +113,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=11 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp14-linux-STL: name: Syntax Check - GCC C++14 Linux STL @@ -130,7 +131,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp14-linux-No-STL: name: Syntax Check - GCC C++14 Linux No STL @@ -148,7 +149,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp14-linux-STL-Force-CPP03: name: Syntax Check - GCC C++14 Linux STL Force C++03 @@ -166,7 +167,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp14-linux-No-STL-Force-CPP03: name: Syntax Check - GCC C++14 Linux No STL Force C++03 @@ -184,7 +185,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=14 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp17-linux-STL: name: Syntax Check - GCC C++17 Linux STL @@ -202,7 +203,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp17-linux-No-STL: name: Syntax Check - GCC C++17 Linux No STL @@ -220,7 +221,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp17-linux-STL-Force-CPP03: name: Syntax Check - GCC C++17 Linux STL Force C++03 @@ -238,7 +239,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp17-linux-No-STL-Force-CPP03: name: Syntax Check - GCC C++17 Linux No STL Force C++03 @@ -256,7 +257,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=17 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp20-linux-STL: name: Syntax Check - GCC C++20 Linux STL @@ -274,7 +275,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp20-linux-No-STL: name: Syntax Check - GCC C++20 Linux No STL @@ -292,7 +293,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp20-linux-STL-Force-CPP03: name: Syntax Check - GCC C++20 Linux STL Force C++03 @@ -310,7 +311,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp20-linux-No-STL-Force-CPP03: name: Syntax Check - GCC C++20 Linux No STL Force C++03 @@ -328,7 +329,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=20 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp23-linux-STL: name: Syntax Check - GCC C++23 Linux STL @@ -346,7 +347,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp23-linux-No-STL: name: Syntax Check - GCC C++23 Linux No STL @@ -364,7 +365,7 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=23 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp23-linux-STL-Force-CPP03: name: Syntax Check - GCC C++23 Linux STL Force C++03 @@ -382,7 +383,7 @@ jobs: export CXX=g++ cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) + make -j "$(getconf _NPROCESSORS_ONLN)" build-gcc-cpp23-linux-No-STL-Force-CPP03: name: Syntax Check - GCC C++23 Linux No STL Force C++03 @@ -400,4 +401,84 @@ jobs: export CXX=g++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=23 ./test/syntax_check gcc --version - make -j $(getconf _NPROCESSORS_ONLN) \ No newline at end of file + make -j "$(getconf _NPROCESSORS_ONLN)" + + build-gcc-cpp26-linux-STL: + name: Syntax Check - GCC C++26 Linux STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" + + build-gcc-cpp26-linux-No-STL: + name: Syntax Check - GCC C++26 Linux No STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" + + build-gcc-cpp26-linux-STL-Force-CPP03: + name: Syntax Check - GCC C++26 Linux STL Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" + + build-gcc-cpp26-linux-No-STL-Force-CPP03: + name: Syntax Check - GCC C++26 Linux No STL Force C++03 + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build -t etl-ubuntu-2604 -f .devcontainer/ubuntu-26.04/Dockerfile . + + - name: Build + run: | + docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-ubuntu-2604 bash -c "\ + cd /workspaces/etl && \ + export CC=gcc && \ + export CXX=g++ && \ + cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_CXX_STANDARD=26 ./test/syntax_check && \ + gcc --version && \ + make -j \$(getconf _NPROCESSORS_ONLN)" diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml new file mode 100644 index 00000000..1829c342 --- /dev/null +++ b/.github/workflows/generator.yml @@ -0,0 +1,24 @@ +name: generator checks +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + generator-run: + name: Header Generator + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y python3-cogapp + + - name: Run generator_test.py + run: | + cd scripts && python3 generator_test.py diff --git a/.github/workflows/meson-gcc-c++23-no-stl.yml b/.github/workflows/meson-gcc-c++23-no-stl.yml new file mode 100644 index 00000000..d8767317 --- /dev/null +++ b/.github/workflows/meson-gcc-c++23-no-stl.yml @@ -0,0 +1,31 @@ +name: meson-gcc-c++23-no-stl +on: + push: + branches: [ master, development, pull-request/* ] + pull_request: + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] + +jobs: + + build-meson-gcc-cpp23-no-stl: + name: Meson GCC C++23 Linux - No STL + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v6 + + - name: Install Meson + run: sudo apt-get install -y meson + + - name: Configure + run: | + export CC=gcc + export CXX=g++ + meson setup builddir -Duse_stl=false -Dcpp_std=c++23 + + - name: Build + run: meson compile -C builddir + + - name: Run tests + run: meson test -C builddir -v diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index f910048a..32d7aee8 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -3,7 +3,8 @@ on: push: branches: [ master, development, pull-request/* ] pull_request: - branches: [ master, pull-request/* ] + branches: [ master, development, pull-request/* ] + types: [opened, synchronize, reopened] jobs: build-windows-msvc-stl: @@ -21,12 +22,12 @@ jobs: - name: Build run: | - cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=20 ./ + cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ./ MSBuild.exe -version MSBuild.exe .\etl.sln - name: Run tests - run: test/Debug/etl_tests.exe + run: test/Debug/etl_tests.exe -v build-windows-msvc-no-stl: name: Windows - No STL @@ -47,7 +48,7 @@ jobs: MSBuild.exe .\etl.sln - name: Run tests - run: test/Debug/etl_tests.exe + run: test/Debug/etl_tests.exe -v build-windows-msvc-stl-force-cpp03: name: Windows - STL - Force C++03 @@ -69,7 +70,7 @@ jobs: MSBuild.exe .\etl.sln - name: Run tests - run: test/Debug/etl_tests.exe + run: test/Debug/etl_tests.exe -v build-windows-msvc-no-stl-force-cpp03: name: Windows - No STL - Force C++03 @@ -91,5 +92,5 @@ jobs: MSBuild.exe .\etl.sln - name: Run tests - run: test/Debug/etl_tests.exe + run: test/Debug/etl_tests.exe -v diff --git a/.github/workflows/platformio-update.yml b/.github/workflows/platformio-update.yml new file mode 100644 index 00000000..318cf953 --- /dev/null +++ b/.github/workflows/platformio-update.yml @@ -0,0 +1,26 @@ +name: Publish ETL to PlatformIO + +on: + release: + types: [published] # Trigger only when a GitHub release is published + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install PlatformIO + run: pip install platformio + + - name: Publish to PlatformIO Registry + run: pio package publish --owner etlcpp --non-interactive + env: + PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_TOKEN }} diff --git a/.gitignore b/.gitignore index 8caedc19..60d4e469 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ ## Personal ################# docs/html +hugo/public +hugo/.hugo_build.lock include/etl/html/ include/etl/latex/ test/vs2013/Debug @@ -400,3 +402,23 @@ test/vs2022/Debug MSVC C++20 - Forve C++03 - No virtual messages test/reflog.txt test/etl_error_handler/assert_function/build-make test/syntax_check/bgcc +test/vs2022/Debug MSVC C++23 +test/vs2022/Debug MSVC C++23 - No STL +.vs +examples/UniquePtrWithPool/CMakeFiles +examples/UniquePtrWithPool/cmake_install.cmake +examples/UniquePtrWithPool/Makefile +examples/UniquePtrWithPool/CMakeCache.txt +examples/UniquePtrWithPool/UniquePtrWithPool +test/vs2022/Debug Clang C++20 - Optimised -O2 +include/etl/header_file_list.txt +temp +test/syntax_check/build-make +hugo/public +hugo/resources +hugo/.hugo_build.lock +docs/*.html +test/build-coverage +include/etl/iterator.h~RFfd5eda.TMP +test/vs2022/Build +docs/Messaging diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e69de29b diff --git a/.treefmt.toml b/.treefmt.toml new file mode 100644 index 00000000..0e6248a0 --- /dev/null +++ b/.treefmt.toml @@ -0,0 +1,45 @@ +[global] +excludes = [ + "**/Doxyfile", + "**/Makefile", + "*.*-format", + "*.S", + "*.cmm", + "*.css", + "*.dld", + "*.gdb", + "*.gif", + "*.gitignore", + "*.html", + "*.ini", + "*.josh", + "*.json", + "*.md", + "*.png", + "*.puml", + "*.py", + "*.rb", + "*.rst", + "*.s", + "*.sh", + "*.spec", + "*.toml", + "*.txt", + "*.yaml", + "*.yml", + "docker/**", + "temp/**", + "scripts/clang-format-wrapper", + "include/etl/generators/**", + "include/etl/private/*_cpp03.h", + "subprojects/**", + "test/UnitTest++/**", + "test/Deprecated/**", + "test/Performance/**", + "test/temp/**" +] + +[formatter.cpp] +command = "scripts/clang-format-wrapper" +options = [ "-i", "--style=file" ] +includes = [ "*.c", "*.cc", "*.cpp", "*.h", "*.hh", "*.hpp" ] diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 00000000..3bdb072e --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,9 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "etl", + hdrs = glob(["include/**/*.h"]), + includes = ["include"], +) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 693910fe..2d7a3028 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,17 @@ # How to contribute -If your are considering creating a pull request, please observe the following: +Thanks for considering a contribution! Here’s what you need to know before opening a pull request: - If you are adding or modifying a feature, add *new* unit tests that test that feature. - If you are fixing a bug, add a unit test that *fails* before the bug fix is implemented. -- Do not initiate a pull request until all of the units tests pass. -- Branches should be based on the branch `master`. +- Do not initiate a pull request until all of the units tests pass. See below for information on project files and test scripts. +- Branches should be based on the branch `master`. If `development` has pending updates, I’ll rebase the PR against it before pulling.. +- For formatting help, you can use clang-format, or the convenience wrapper treefmt. See also [docs/source-formatting.md](docs/source-formatting.md) -There is a project file for VS2022 for C++14, 17, 20, and bash scripts that run the tests for C++11, 14, 17, 20 under Linux with GCC and Clang. +There is a project file for VS2022 for C++14, 17, 20, 23, and bash scripts that run the tests for C++11, 14, 17, 20, 23 under Linux with GCC and Clang. +There are syntax-only check bash scripts that cover C++03, 11, 14, 17, 20, 23 under Linux with GCC and Clang. If you are thinking of adding a new feature then raise this on the GitHub Issues page for discussion as the maintainers and user of the ETL may have questions or suggestions. -It is possible that the maintainer of the ETL or another contributor is already working on the same or a related feature. +It is possible that the maintainer of the ETL or another contributor is already working on the same or a related feature. + +Take a look through our current issues and see if anything sparks your interest! diff --git a/Converting header guards.txt b/Converting header guards.txt new file mode 100644 index 00000000..ebac60b0 --- /dev/null +++ b/Converting header guards.txt @@ -0,0 +1,12 @@ +How to convert the ETL header beween #include guards and #pragma once. + +Install +python3 -m pip install guardonce + +Navigate to etl/scripts + +Change from #include guard to #pragma once +./convert_headers_to_use_once.bat + +Change from #pragma once to #include guard +./convert_headers_to_use_guards.bat diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md new file mode 100644 index 00000000..2da43c6b --- /dev/null +++ b/DOCUMENTATION.md @@ -0,0 +1,144 @@ +# Viewing the documentation locally + +The documentation for this project is built using [Hugo](https://gohugo.io/), a static site generator. +This guide will walk you through installing Hugo and running the documentation site on your machine. + +--- + +## Prerequisites + +- You must have already cloned this repository, including its submodules (the Hugo themes are stored as submodules). +- If you cloned without submodules, run this first: +```bash + git submodule update --init --recursive +``` + +--- + +## Step 1: Install Hugo Extended + +This project requires the **extended** version of Hugo, which includes support for additional features such as SCSS/Sass processing. +Make sure you install the extended version, not the standard one. + +### Windows + +1. The easiest way to install Hugo on Windows is via [Chocolatey](https://chocolatey.org/). If you have it installed, open a command prompt as Administrator and run: +```bash + choco install hugo-extended -y +``` +2. If you don't have Chocolatey, you can download Hugo Extended directly from the [Hugo releases page](https://github.com/gohugoio/hugo/releases). +Download the file named `hugo_extended_x.x.x_windows-amd64.zip`, extract it, and add the folder to your system PATH. +3. Verify the installation by opening a new command prompt and running: +```bash + hugo version +``` + You should see the word **extended** in the output, for example: `hugo v0.x.x+extended`. + +### macOS + +1. The easiest way to install Hugo Extended on macOS is via [Homebrew](https://brew.sh/). Homebrew installs the extended version by default. If you have it installed, open a terminal and run: +```bash + brew install hugo +``` +2. If you don't have Homebrew, you can install it first by following the instructions at [brew.sh](https://brew.sh/), then run the command above. +3. Verify the installation by running: +```bash + hugo version +``` + You should see the word **extended** in the output, for example: `hugo v0.x.x+extended`. + +### Linux + +1. Package managers often provide an older or non-extended version of Hugo, so the recommended approach is to download the latest extended release directly from the [Hugo releases page](https://github.com/gohugoio/hugo/releases). + Download the file named `hugo_extended_x.x.x_linux-amd64.tar.gz`, then run: +```bash + tar -xzf hugo_extended_x.x.x_linux-amd64.tar.gz + sudo mv hugo /usr/local/bin/ +``` +2. Verify the installation by running: +```bash + hugo version +``` + You should see the word **extended** in the output, for example: `hugo v0.x.x+extended`. + +--- + +## Step 2: Run the documentation site + +1. Open a terminal (or command prompt on Windows) and navigate to the `hugo` directory inside the project: +```bash + cd hugo +``` + +2. Start the Hugo development server: +```bash + hugo server +``` + +3. Hugo will start a local web server. You will see output similar to: +``` + Web Server is available at http://localhost:1313/ +``` + +4. Open your browser and go to **http://localhost:1313/** to view the documentation. + +--- + +## Stopping the server + +To stop the Hugo server, go back to your terminal and press **Ctrl+C**. + +--- + +## Editing the Documentation + +The documentation source files are located in the `/docs` directory at the root of the repository — +**not** inside the `hugo` directory. Hugo is configured to mount this directory automatically via +`hugo.toml`, so any changes you make to files in `/docs` will be picked up by the Hugo development +server straight away. + +Here is a quick overview of where things live: +``` +hugo/ +├── layouts/ # HTML templates (you probably won't need to touch these) +├── themes/ # The Hugo theme (managed as a git submodule) +└── hugo.toml # Hugo configuration file (includes the /docs content mount) + +docs/ +└── section-name/ # Each subdirectory becomes a section in the documentation + ├── _index.md # The landing page for that section + └── my-page.md # Individual pages within the section +``` + +### Adding or Editing a Page + +All documentation pages are written in **Markdown** (`.md` files). To edit an existing page, open +the relevant `.md` file in the `/docs` directory and make your changes. + +The documentation is written in [Goldmark](https://github.com/teekennedy/goldmark-markdown) markdown. + +Hugo uses [Goldmark](https://github.com/teekennedy/goldmark-markdown) as its default Markdown processor for versions 0.60.0 and newer. +It is built into Hugo, providing high-performance and fully [CommonMark](https://commonmark.org/)-compliant rendering, along with support for [GitHub](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) Markdown. + +### Starting a New Page + +A template file is provided at `docs/page-template.md` to use as a starting point. Copy it to the +appropriate section directory, rename it, and edit the front matter, in particular, change the +`title` and remove the `draft: true` line, otherwise Hugo will not include your page in the +documentation. + +### Previewing Your Changes + +If you have the Hugo development server running (see [Step 2](#step-2--run-the-documentation-site)), +your changes will appear in the browser automatically as soon as you save the file. There is no need +to restart the server. + +### Images and Other Assets + +If you need to include images in your documentation, place them in the `hugo/static/` directory and +reference them in your Markdown like so: +```markdown +![Alt text](/my-image.png) +``` + +The site will automatically refresh in your browser whenever you save changes to the documentation files. diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 00000000..a52b73e8 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,7 @@ +module( + name = "etl", + version = "0.0.0", +) + +bazel_dep(name = "platforms", version = "0.0.11") +bazel_dep(name = "rules_cc", version = "0.1.1") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock new file mode 100644 index 00000000..c6bcd5ce --- /dev/null +++ b/MODULE.bazel.lock @@ -0,0 +1,205 @@ +{ + "lockFileVersion": 24, + "registryFileHashes": { + "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", + "https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2", + "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589", + "https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0.bcr.1/MODULE.bazel": "1c8cec495288dccd14fdae6e3f95f772c1c91857047a098fad772034264cc8cb", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0/MODULE.bazel": "d253ae36a8bd9ee3c5955384096ccb6baf16a1b1e93e858370da0a3b94f77c16", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/source.json": "9be551b8d4e3ef76875c0d744b5d6a504a27e3ae67bc6b28f46415fd2d2957da", + "https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd", + "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8", + "https://bcr.bazel.build/modules/bazel_features/1.15.0/MODULE.bazel": "d38ff6e517149dc509406aca0db3ad1efdd890a85e049585b7234d04238e2a4d", + "https://bcr.bazel.build/modules/bazel_features/1.17.0/MODULE.bazel": "039de32d21b816b47bd42c778e0454217e9c9caac4a3cf8e15c7231ee3ddee4d", + "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a", + "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58", + "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", + "https://bcr.bazel.build/modules/bazel_features/1.30.0/source.json": "b07e17f067fe4f69f90b03b36ef1e08fe0d1f3cac254c1241a1818773e3423bc", + "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", + "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", + "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a", + "https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651", + "https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138", + "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/source.json": "f121b43eeefc7c29efbd51b83d08631e2347297c95aac9764a701f2a6a2bb953", + "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84", + "https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8", + "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb", + "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", + "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6", + "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/source.json": "41e9e129f80d8c8bf103a7acc337b76e54fad1214ac0a7084bf24f4cd924b8b4", + "https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f", + "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075", + "https://bcr.bazel.build/modules/jsoncpp/1.9.5/source.json": "4108ee5085dd2885a341c7fab149429db457b3169b86eb081fa245eadf69169d", + "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902", + "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5", + "https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f", + "https://bcr.bazel.build/modules/platforms/0.0.11/source.json": "f7e188b79ebedebfe75e9e1d098b8845226c7992b307e28e1496f23112e8fc29", + "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee", + "https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37", + "https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615", + "https://bcr.bazel.build/modules/platforms/0.0.7/MODULE.bazel": "72fd4a0ede9ee5c021f6a8dd92b503e089f46c227ba2813ff183b71616034814", + "https://bcr.bazel.build/modules/platforms/0.0.8/MODULE.bazel": "9f142c03e348f6d263719f5074b21ef3adf0b139ee4c5133e2aa35664da9eb2d", + "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", + "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c", + "https://bcr.bazel.build/modules/protobuf/27.1/MODULE.bazel": "703a7b614728bb06647f965264967a8ef1c39e09e8f167b3ca0bb1fd80449c0d", + "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df", + "https://bcr.bazel.build/modules/protobuf/29.0/MODULE.bazel": "319dc8bf4c679ff87e71b1ccfb5a6e90a6dbc4693501d471f48662ac46d04e4e", + "https://bcr.bazel.build/modules/protobuf/29.0/source.json": "b857f93c796750eef95f0d61ee378f3420d00ee1dd38627b27193aa482f4f981", + "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", + "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/MODULE.bazel": "88af1c246226d87e65be78ed49ecd1e6f5e98648558c14ce99176da041dc378e", + "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/source.json": "be4789e951dd5301282729fe3d4938995dc4c1a81c2ff150afc9f1b0504c6022", + "https://bcr.bazel.build/modules/re2/2023-09-01/MODULE.bazel": "cb3d511531b16cfc78a225a9e2136007a48cf8a677e4264baeab57fe78a80206", + "https://bcr.bazel.build/modules/re2/2023-09-01/source.json": "e044ce89c2883cd957a2969a43e79f7752f9656f6b20050b62f90ede21ec6eb4", + "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8", + "https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", + "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", + "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", + "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191", + "https://bcr.bazel.build/modules/rules_cc/0.0.14/MODULE.bazel": "5e343a3aac88b8d7af3b1b6d2093b55c347b8eefc2e7d1442f7a02dc8fea48ac", + "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc", + "https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87", + "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", + "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", + "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", + "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", + "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513", + "https://bcr.bazel.build/modules/rules_cc/0.1.1/source.json": "d61627377bd7dd1da4652063e368d9366fc9a73920bfa396798ad92172cf645c", + "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", + "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8", + "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/source.json": "c8b1e2c717646f1702290959a3302a178fb639d987ab61d548105019f11e527e", + "https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", + "https://bcr.bazel.build/modules/rules_java/5.3.5/MODULE.bazel": "a4ec4f2db570171e3e5eb753276ee4b389bae16b96207e9d3230895c99644b86", + "https://bcr.bazel.build/modules/rules_java/6.0.0/MODULE.bazel": "8a43b7df601a7ec1af61d79345c17b31ea1fedc6711fd4abfd013ea612978e39", + "https://bcr.bazel.build/modules/rules_java/6.4.0/MODULE.bazel": "e986a9fe25aeaa84ac17ca093ef13a4637f6107375f64667a15999f77db6c8f6", + "https://bcr.bazel.build/modules/rules_java/6.5.2/MODULE.bazel": "1d440d262d0e08453fa0c4d8f699ba81609ed0e9a9a0f02cd10b3e7942e61e31", + "https://bcr.bazel.build/modules/rules_java/7.10.0/MODULE.bazel": "530c3beb3067e870561739f1144329a21c851ff771cd752a49e06e3dc9c2e71a", + "https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6", + "https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab", + "https://bcr.bazel.build/modules/rules_java/7.3.2/MODULE.bazel": "50dece891cfdf1741ea230d001aa9c14398062f2b7c066470accace78e412bc2", + "https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", + "https://bcr.bazel.build/modules/rules_java/8.14.0/MODULE.bazel": "717717ed40cc69994596a45aec6ea78135ea434b8402fb91b009b9151dd65615", + "https://bcr.bazel.build/modules/rules_java/8.14.0/source.json": "8a88c4ca9e8759da53cddc88123880565c520503321e2566b4e33d0287a3d4bc", + "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", + "https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909", + "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036", + "https://bcr.bazel.build/modules/rules_jvm_external/5.3/MODULE.bazel": "bf93870767689637164657731849fb887ad086739bd5d360d90007a581d5527d", + "https://bcr.bazel.build/modules/rules_jvm_external/6.1/MODULE.bazel": "75b5fec090dbd46cf9b7d8ea08cf84a0472d92ba3585b476f44c326eda8059c4", + "https://bcr.bazel.build/modules/rules_jvm_external/6.3/MODULE.bazel": "c998e060b85f71e00de5ec552019347c8bca255062c990ac02d051bb80a38df0", + "https://bcr.bazel.build/modules/rules_jvm_external/6.3/source.json": "6f5f5a5a4419ae4e37c35a5bb0a6ae657ed40b7abc5a5189111b47fcebe43197", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.0/MODULE.bazel": "ef85697305025e5a61f395d4eaede272a5393cee479ace6686dba707de804d59", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/source.json": "2faa4794364282db7c06600b7e5e34867a564ae91bda7cae7c29c64e9466b7d5", + "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", + "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", + "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", + "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb", + "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/MODULE.bazel": "5b1df97dbc29623bccdf2b0dcd0f5cb08e2f2c9050aab1092fd39a41e82686ff", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/source.json": "bd82e5d7b9ce2d31e380dd9f50c111d678c3bdaca190cb76b0e1c71b05e1ba8a", + "https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06", + "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", + "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73", + "https://bcr.bazel.build/modules/rules_proto/7.0.2/MODULE.bazel": "bf81793bd6d2ad89a37a40693e56c61b0ee30f7a7fdbaf3eabbf5f39de47dea2", + "https://bcr.bazel.build/modules/rules_proto/7.0.2/source.json": "1e5e7260ae32ef4f2b52fd1d0de8d03b606a44c91b694d2f1afb1d3b28a48ce1", + "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f", + "https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300", + "https://bcr.bazel.build/modules/rules_python/0.25.0/MODULE.bazel": "72f1506841c920a1afec76975b35312410eea3aa7b63267436bfb1dd91d2d382", + "https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed", + "https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58", + "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", + "https://bcr.bazel.build/modules/rules_python/0.40.0/MODULE.bazel": "9d1a3cd88ed7d8e39583d9ffe56ae8a244f67783ae89b60caafc9f5cf318ada7", + "https://bcr.bazel.build/modules/rules_python/0.40.0/source.json": "939d4bd2e3110f27bfb360292986bb79fd8dcefb874358ccd6cdaa7bda029320", + "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", + "https://bcr.bazel.build/modules/rules_shell/0.2.0/source.json": "7f27af3c28037d9701487c4744b5448d26537cc66cdef0d8df7ae85411f8de95", + "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", + "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", + "https://bcr.bazel.build/modules/stardoc/0.5.6/MODULE.bazel": "c43dabc564990eeab55e25ed61c07a1aadafe9ece96a4efabb3f8bf9063b71ef", + "https://bcr.bazel.build/modules/stardoc/0.7.0/MODULE.bazel": "05e3d6d30c099b6770e97da986c53bd31844d7f13d41412480ea265ac9e8079c", + "https://bcr.bazel.build/modules/stardoc/0.7.1/MODULE.bazel": "3548faea4ee5dda5580f9af150e79d0f6aea934fc60c1cc50f4efdd9420759e7", + "https://bcr.bazel.build/modules/stardoc/0.7.1/source.json": "b6500ffcd7b48cd72c29bb67bcac781e12701cc0d6d55d266a652583cfcdab01", + "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", + "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/source.json": "22bc55c47af97246cfc093d0acf683a7869377de362b5d1c552c2c2e16b7a806", + "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198" + }, + "selectedYankedVersions": {}, + "moduleExtensions": { + "@@rules_kotlin+//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { + "general": { + "bzlTransitiveDigest": "rL/34P1aFDq2GqVC2zCFgQ8nTuOC6ziogocpvG50Qz8=", + "usagesDigest": "QI2z8ZUR+mqtbwsf2fLqYdJAkPOHdOV+tF2yVAUgRzw=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "com_github_jetbrains_kotlin_git": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_compiler_git_repository", + "attributes": { + "urls": [ + "https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip" + ], + "sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88" + } + }, + "com_github_jetbrains_kotlin": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_capabilities_repository", + "attributes": { + "git_repository_name": "com_github_jetbrains_kotlin_git", + "compiler_version": "1.9.23" + } + }, + "com_github_google_ksp": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:ksp.bzl%ksp_compiler_plugin_repository", + "attributes": { + "urls": [ + "https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip" + ], + "sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d", + "strip_version": "1.9.23-1.0.20" + } + }, + "com_github_pinterest_ktlint": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_file", + "attributes": { + "sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985", + "urls": [ + "https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint" + ], + "executable": true + } + }, + "rules_android": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", + "strip_prefix": "rules_android-0.1.1", + "urls": [ + "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "rules_kotlin+", + "bazel_tools", + "bazel_tools" + ] + ] + } + } + }, + "facts": {} +} diff --git a/README.md b/README.md index b237c5e8..c1b7db15 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,21 @@ -Embedded Template Library (ETL) -------------------------- +# ![alt text](https://github.com/ETLCPP/etl/blob/master/images/etl64.png?raw=true) Embedded Template Library (ETL) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/jwellbelove/etl) [![Release date](https://img.shields.io/github/release-date/jwellbelove/etl?color=%231182c3)](https://img.shields.io/github/release-date/jwellbelove/etl?color=%231182c3) -[![Standard](https://img.shields.io/badge/c%2B%2B-98/03/11/14/17/20-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization) +[![Standard](https://img.shields.io/badge/c%2B%2B-98/03/11/14/17/20/23/26-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![GitHub contributors](https://img.shields.io/github/contributors-anon/ETLCPP/etl) ![GitHub forks](https://img.shields.io/github/forks/ETLCPP/etl?style=flat) ![GitHub Repo stars](https://img.shields.io/github/stars/ETLCPP/etl?style=flat) -![CI](https://github.com/ETLCPP/etl/workflows/msvc/badge.svg?branch=master) -[![Build status](https://ci.appveyor.com/api/projects/status/b7jgecv7unqjw4u0/branch/master?svg=true)](https://ci.appveyor.com/project/jwellbelove/etl/branch/master) +![CI](https://github.com/ETLCPP/etl/actions/workflows/msvc.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++11.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++14.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++17.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++20.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++23.yml/badge.svg?branch=master) +![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++26.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-syntax-checks.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++11.yml/badge.svg?branch=master) @@ -24,57 +23,98 @@ Embedded Template Library (ETL) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++17.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++20.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++23.yml/badge.svg?branch=master) +![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++26.yml/badge.svg?branch=master) ![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-syntax-checks.yml/badge.svg?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3c14cd918ccf40008d0bcd7b083d5946)](https://www.codacy.com/manual/jwellbelove/etl?utm_source=github.com&utm_medium=referral&utm_content=ETLCPP/etl&utm_campaign=Badge_Grade) [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://www.etlcpp.com/sponsor.html) -[Project documentation](https://www.etlcpp.com/) +[**Project documentation**](https://www.etlcpp.com/) ## Motivation -C++ is a great language to use for embedded applications and templates are a powerful aspect. The standard library can offer a great deal of well tested functionality, but there are some parts of the standard library that do not fit well with deterministic behaviour and limited resource requirements. These limitations usually preclude the use of dynamically allocated memory and containers with open ended sizes. +C++ is a powerful language for embedded systems development, with templates offering a great deal of flexibility and type safety. While the C++ Standard Library provides a wealth of well-tested functionality, it’s often not well suited to environments with strict deterministic behavior and limited resources. -What is needed is a template library where the user can declare the size, or maximum size of any object upfront. Most embedded compilers do not currently support the standard beyond C++ 03, therefore excluding the programmer from using the enhanced features of the later library. +In many embedded applications, dynamic memory allocation is discouraged or outright prohibited, making standard STL containers and many other components impractical or unusable. -This is what the ETL attempts to achieve. +What’s needed is a template library specifically designed for embedded systems — one that allows developers to define fixed or maximum sizes for containers and other objects at compile time. Additionally, since many embedded toolchains still lack full support for standards beyond C++03, it's valuable to have access to a library that backports select features from later versions of the C++ Standard Library. -## Summary +## About the ETL -The ETL is not designed to completely replace the STL, but complement it. -Its design objective covers three areas. +The Embedded Template Library (ETL) is not intended as a full replacement for the C++ Standard Template Library (STL), but rather as a complementary solution tailored specifically for embedded systems. -- Create a set of containers where the size or maximum size is determined at compile time. These containers are direct equivalents of those supplied in the STL. -- Be compatible with C++ 03 but implement as many of the C++ 11/14/17/20/23 additions as possible. -- Add other useful components that are not present in the standard library. +Its design goals include: -The embedded template library has been designed for lower resource embedded applications. -It contains a set of containers, algorithms and utilities, some of which emulate parts of the STL. -There is no dynamic memory allocation. The library makes no use of the heap. All of the containers have a fixed capacity allowing all memory allocation to be determined at compile time. -The library is intended for any compiler that supports C++98/03/11/14/17/20/23. +- Providing a set of containers with fixed or maximum sizes defined at compile-time. -## Main features +- Offering APIs that closely resemble those of the STL, enabling familiar and consistent usage. -- Cross platform. This library is not specific to any processor type. -- No dynamic memory allocation -- No RTTI required -- Very little use of virtual functions. They are used only when they are absolutely necessary for the required functionality -- A set of fixed capacity containers. (array, bitset, deque, forward_list, list, queue, stack, vector, map, set, etc.) -- As the storage for all of the container types is allocated as a contiguous block, they are extremely cache friendly -- Templated compile time constants -- Templated design pattern base classes (Visitor, Observer) -- Reverse engineered C++ 0x11 features (type traits, algorithms, containers etc.) -- Type-safe enumerations -- Type-safe typedefs -- 8, 16, 32 & 64 bit CRC calculations -- Checksums & hash functions -- Variants (a type that can store many types in a type-safe interface) -- Choice of asserts, exceptions, error handler or no checks on errors -- Unit tested (currently over 9400 tests), using VS2022, GCC 12, Clang 14. -- Many utilities for template support. -- Easy to read and documented source. -- Free support via email, GitHub and Slack +- Maintaining compatibility with C++98 while implementing many features introduced in later standards +(C++11/14/17/20/23/26) where possible. + +- Ensuring deterministic behavior, which is critical in real-time and resource-constrained environments. + +- Introducing additional components and utilities useful in embedded contexts but absent from the STL. + +The ETL avoids dynamic memory allocation entirely; the heap is never used. All non-intrusive containers have a fixed capacity, allowing memory requirements to be fully determined at compile-time. This makes the ETL ideal for lower-resource embedded applications where predictability, performance, and memory control are essential. + +The library is compatible with any compiler that supports C++03 or later. + +Help on integrating the ETL with your project may be found here. + + +## Key features of the ETL + +- Actively Maintained: Developed and maintained on GitHub since 2014. + +- Open Source: MIT licensed. + +- No STL Dependency: Designed to operate independently of the C++ Standard Template Library. + +- No Dynamic Memory Allocation: All storage is allocated either at compile-time or on the stack; heap usage is entirely avoided. + +- RTTI and Virtual Functions: No runtime type information (RTTI) is required. Virtual functions are used sparingly and only when strictly necessary. + +- Header-Only Library: All functionality is provided via header files; No separate compilation needed. + +- Fixed-Capacity Containers: Offers STL-like containers with fixed or maximum capacity, plus additional non-standard container types. + +- Cache Efficiency: Containers use contiguous memory layouts for optimal cache performance. + +- Compact Codebase: Shared base classes (based on type) help reduce overall container code size. + +- Compile-Time Features: + - Templated compile-time constants + - Template-based design pattern base classes (e.g., Visitor, Observer) + - Type-safe smart enumerations + - Type-safe typedefs and constants + +- Embedded System Frameworks: + - Message routing + - Finite state machines + - Task scheduling + +- C++11 Backports: Implements many C++11 features (type traits, algorithms, containers) for use in C++03 environments. + +- Utilities: + - CRC calculations (8, 16, 32 & 64-bit) + - Checksums and hash functions + - Variants (type-safe unions) + - Extensive template support utilities + +- Robust Error Handling: Configurable error checking using asserts, exceptions, error handlers, or no checks; user’s choice. + +- Thoroughly Tested: + - Over 10,000 unit tests + - Tested with Visual Studio 2022, GCC 12, and Clang 14 + - Continuous integration via GitHub Actions. + +- Readable and Well-Documented: Clean, maintainable source code with clear documentation. + +- Support: Free email support available. A Slack group is available. Paid support on request. + +- Archived: A snapshot of the ETL is preserved in the Arctic Code Vault for long-term digital preservation. Any help porting the library to work under different platforms and compilers would be gratefully received. I am especially interested in people who are using Keil, IAR, Green Hills, TI Code Composer etc, bare metal or RTOS, and DSPs. @@ -125,12 +165,12 @@ add_executable(foo main.cpp) target_link_libraries(foo PRIVATE etl::etl) ``` +Alternatively you can use [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html). -Alternatively you can use [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html), -replacing `` with the version to install based on a git tag: +By Git, replacing `` with the version to install based on a git tag: -```sh -Include(FetchContent) +```cmake +include(FetchContent) FetchContent_Declare( etl @@ -144,6 +184,103 @@ add_executable(foo main.cpp) target_link_libraries(foo PRIVATE etl::etl) ``` +Or by URL, fetching a release tarball directly, again replacing `` with the desired version: + +```cmake +include(FetchContent) + +FetchContent_Declare( + etl + URL https://github.com/ETLCPP/etl/archive/refs/tags/.tar.gz +) + +FetchContent_MakeAvailable(etl) + +add_executable(foo main.cpp) +target_link_libraries(foo PRIVATE etl::etl) +``` + +A tarball fetched this way has no `.git` directory of its own. ETL detects this and falls back to +reading its version from `version.txt` instead of `git describe`, so no extra configuration is needed. + +## Profile definition + +When using ETL in a project, there is typically an `etl_profile.h` defined to +adjust ETL to the project needs. ETL will automatically find `etl_profile.h` +if it is available in the include path(s). If it's not available, ETL will +work with default values. + +### Example + +``` +#ifndef __ETL_PROFILE_H__ +#define __ETL_PROFILE_H__ + +#define ETL_TARGET_DEVICE_GENERIC +#define ETL_TARGET_OS_NONE + +#define ETL_NO_STL + +#endif +``` + +## Platform specific implementation + +Although ETL is generally a self-contained header-only library, some interfaces need to be +implemented in every project or platform, at least if those interfaces are actually being +used, due to project specifics: + +| ETL header | Platform specific API to be implemented | Needed when using | +|------------|-----------------------------------------|-------------------------------------| +| `chrono.h` | `etl_get_high_resolution_clock()` | `etl::high_resolution_clock::now()` | +| | `etl_get_system_clock()` | `etl::system_clock::now()` | +| | `etl_get_steady_clock()` | `etl::steady_clock::now()` | +| `print.h` | `etl_putchar()` | `etl::print()` | +| | | `etl::println()` | + +### Example + +``` +#include +#include + +extern "C" +{ + +etl::chrono::high_resolution_clock::rep etl_get_high_resolution_clock() +{ + return etl::chrono::high_resolution_clock::rep(static_cast(getSystemTimeNs())); +} + +etl::chrono::system_clock::rep etl_get_system_clock() +{ + return etl::chrono::system_clock::rep(static_cast(getSystemTimeNs())); +} + +etl::chrono::system_clock::rep etl_get_steady_clock() +{ + return etl::chrono::system_clock::rep(static_cast(getSystemTimeNs())); +} + +void etl_putchar(int c) +{ + putByteToStdout(static_cast(c)); +} + +} +``` + +The following default values apply if the respective macros are not defined +(e.g. in `etl_profile.h`): + +| Macro | Default | +|-----------------------------------------------|----------------------------| +| `ETL_CHRONO_SYSTEM_CLOCK_DURATION` | `etl::chrono::nanoseconds` | +| `ETL_CHRONO_SYSTEM_CLOCK_IS_STEADY` | `true` | +| `ETL_CHRONO_HIGH_RESOLUTION_CLOCK_DURATION` | `etl::chrono::nanoseconds` | +| `ETL_CHRONO_HIGH_RESOLUTION_CLOCK_IS_STEADY` | `true` | +| `ETL_CHRONO_STEADY_CLOCK_DURATION` | `etl::chrono::nanoseconds` | + ## Arduino library The content of this repo is available as a library in the Arduino IDE (search for the "Embedded Template Library" in the IDE library manager). The Arduino library repository is available at ```https://github.com/ETLCPP/etl-arduino```, see there for more details. diff --git a/arduino/Embedded_Template_Library.h b/arduino/Embedded_Template_Library.h index 5959207e..64542c84 100644 --- a/arduino/Embedded_Template_Library.h +++ b/arduino/Embedded_Template_Library.h @@ -2,79 +2,95 @@ #ifndef ETL_EMBEDDED_TEMPLATE_LIBRARY_INCLUDED #define ETL_EMBEDDED_TEMPLATE_LIBRARY_INCLUDED -#if defined(TEENSYDUINO) +#if defined(TEENSYDUINO) - #if defined(__AVR_ATmega32U4__) - #define ARDUINO_BOARD "Teensy 2.0" - #elif defined(__AVR_AT90USB1286__) - #define ARDUINO_BOARD "Teensy++ 2.0" - #elif defined(__MK20DX128__) - #define ARDUINO_BOARD "Teensy 3.0" - #elif defined(__MK20DX256__) - #define ARDUINO_BOARD "Teensy 3.2" // and Teensy 3.1 - #elif defined(__MKL26Z64__) - #define ARDUINO_BOARD "Teensy LC" - #elif defined(__MK64FX512__) - #define ARDUINO_BOARD "Teensy 3.5" - #elif defined(__MK66FX1M0__) - #define ARDUINO_BOARD "Teensy 3.6" - #else - #define ARDUINO_BOARD "Unknown" - #endif + #if defined(__AVR_ATmega32U4__) + #define ARDUINO_BOARD "Teensy 2.0" + #elif defined(__AVR_AT90USB1286__) + #define ARDUINO_BOARD "Teensy++ 2.0" + #elif defined(__MK20DX128__) + #define ARDUINO_BOARD "Teensy 3.0" + #elif defined(__MK20DX256__) + #define ARDUINO_BOARD "Teensy 3.2" // and Teensy 3.1 + #elif defined(__MKL26Z64__) + #define ARDUINO_BOARD "Teensy LC" + #elif defined(__MK64FX512__) + #define ARDUINO_BOARD "Teensy 3.5" + #elif defined(__MK66FX1M0__) + #define ARDUINO_BOARD "Teensy 3.6" + #elif defined(ARDUINO_TEENSY40) + #define ARDUINO_BOARD "Teensy 4.0" + #elif defined(ARDUINO_TEENSY41) + #define ARDUINO_BOARD "Teensy 4.1" + #elif defined(ARDUINO_TEENSY_MICROMOD) + #define ARDUINO_BOARD "Teensy MicroMod" + #else + #define ARDUINO_BOARD "Unknown" + #endif + +#elif defined(CORE_ARDUINO_PICO) + + #if defined(PICO_RP2040) + #define ARDUINO_BOARD "RP2040" + #elif defined(PICO_RP2350) + #define ARDUINO_BOARD "RP2350" + #else + #define ARDUINO_BOARD "Unknown" + #endif #else // --------------- Arduino ------------------ - #if defined(ARDUINO_AVR_ADK) - #define ARDUINO_BOARD "Mega Adk" - #elif defined(ARDUINO_AVR_BT) - #define ARDUINO_BOARD "Bt" - #elif defined(ARDUINO_AVR_DUEMILANOVE) - #define ARDUINO_BOARD "Duemilanove" - #elif defined(ARDUINO_AVR_ESPLORA) - #define ARDUINO_BOARD "Esplora" - #elif defined(ARDUINO_AVR_ETHERNET) - #define ARDUINO_BOARD "Ethernet" - #elif defined(ARDUINO_AVR_FIO) - #define ARDUINO_BOARD "Fio" - #elif defined(ARDUINO_AVR_GEMMA) - #define ARDUINO_BOARD "Gemma" - #elif defined(ARDUINO_AVR_LEONARDO) - #define ARDUINO_BOARD "Leonardo" - #elif defined(ARDUINO_AVR_LILYPAD) - #define ARDUINO_BOARD "Lilypad" - #elif defined(ARDUINO_AVR_LILYPAD_USB) - #define ARDUINO_BOARD "Lilypad Usb" - #elif defined(ARDUINO_AVR_MEGA) - #define ARDUINO_BOARD "Mega" - #elif defined(ARDUINO_AVR_MEGA2560) - #define ARDUINO_BOARD "Mega 2560" - #elif defined(ARDUINO_AVR_MICRO) - #define ARDUINO_BOARD "Micro" - #elif defined(ARDUINO_AVR_MINI) - #define ARDUINO_BOARD "Mini" - #elif defined(ARDUINO_AVR_NANO) - #define ARDUINO_BOARD "Nano" - #elif defined(ARDUINO_AVR_NG) - #define ARDUINO_BOARD "NG" - #elif defined(ARDUINO_AVR_PRO) - #define ARDUINO_BOARD "Pro" - #elif defined(ARDUINO_AVR_ROBOT_CONTROL) - #define ARDUINO_BOARD "Robot Ctrl" - #elif defined(ARDUINO_AVR_ROBOT_MOTOR) - #define ARDUINO_BOARD "Robot Motor" - #elif defined(ARDUINO_AVR_UNO) - #define ARDUINO_BOARD "Uno" - #elif defined(ARDUINO_AVR_YUN) - #define ARDUINO_BOARD "Yun" - #elif defined(ARDUINO_SAM_DUE) - #define ARDUINO_BOARD "Due" - #elif defined(ARDUINO_SAMD_ZERO) - #define ARDUINO_BOARD "Zero" - #elif defined(ARDUINO_ARC32_TOOLS) - #define ARDUINO_BOARD "101" - #else - #define ARDUINO_BOARD "Unknown" - #endif + #if defined(ARDUINO_AVR_ADK) + #define ARDUINO_BOARD "Mega Adk" + #elif defined(ARDUINO_AVR_BT) + #define ARDUINO_BOARD "Bt" + #elif defined(ARDUINO_AVR_DUEMILANOVE) + #define ARDUINO_BOARD "Duemilanove" + #elif defined(ARDUINO_AVR_ESPLORA) + #define ARDUINO_BOARD "Esplora" + #elif defined(ARDUINO_AVR_ETHERNET) + #define ARDUINO_BOARD "Ethernet" + #elif defined(ARDUINO_AVR_FIO) + #define ARDUINO_BOARD "Fio" + #elif defined(ARDUINO_AVR_GEMMA) + #define ARDUINO_BOARD "Gemma" + #elif defined(ARDUINO_AVR_LEONARDO) + #define ARDUINO_BOARD "Leonardo" + #elif defined(ARDUINO_AVR_LILYPAD) + #define ARDUINO_BOARD "Lilypad" + #elif defined(ARDUINO_AVR_LILYPAD_USB) + #define ARDUINO_BOARD "Lilypad Usb" + #elif defined(ARDUINO_AVR_MEGA) + #define ARDUINO_BOARD "Mega" + #elif defined(ARDUINO_AVR_MEGA2560) + #define ARDUINO_BOARD "Mega 2560" + #elif defined(ARDUINO_AVR_MICRO) + #define ARDUINO_BOARD "Micro" + #elif defined(ARDUINO_AVR_MINI) + #define ARDUINO_BOARD "Mini" + #elif defined(ARDUINO_AVR_NANO) + #define ARDUINO_BOARD "Nano" + #elif defined(ARDUINO_AVR_NG) + #define ARDUINO_BOARD "NG" + #elif defined(ARDUINO_AVR_PRO) + #define ARDUINO_BOARD "Pro" + #elif defined(ARDUINO_AVR_ROBOT_CONTROL) + #define ARDUINO_BOARD "Robot Ctrl" + #elif defined(ARDUINO_AVR_ROBOT_MOTOR) + #define ARDUINO_BOARD "Robot Motor" + #elif defined(ARDUINO_AVR_UNO) + #define ARDUINO_BOARD "Uno" + #elif defined(ARDUINO_AVR_YUN) + #define ARDUINO_BOARD "Yun" + #elif defined(ARDUINO_SAM_DUE) + #define ARDUINO_BOARD "Due" + #elif defined(ARDUINO_SAMD_ZERO) + #define ARDUINO_BOARD "Zero" + #elif defined(ARDUINO_ARC32_TOOLS) + #define ARDUINO_BOARD "101" + #else + #define ARDUINO_BOARD "Unknown" + #endif #endif #endif diff --git a/arduino/library-arduino.json b/arduino/library-arduino.json index 52f70da7..060f3244 100644 --- a/arduino/library-arduino.json +++ b/arduino/library-arduino.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library ETL", - "version": "20.41.3", + "version": "20.47.1", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/arduino/library-arduino.properties b/arduino/library-arduino.properties index f324c9af..0cbbe88b 100644 --- a/arduino/library-arduino.properties +++ b/arduino/library-arduino.properties @@ -1,5 +1,5 @@ name=Embedded Template Library ETL -version=20.41.3 +version=20.47.1 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/cmake/GetGitRevisionDescription.cmake b/cmake/GetGitRevisionDescription.cmake index d0966da1..d45b2101 100644 --- a/cmake/GetGitRevisionDescription.cmake +++ b/cmake/GetGitRevisionDescription.cmake @@ -82,6 +82,19 @@ function(etl_get_git_head_revision _refspecvar _hashvar) set(GIT_DIR "") endif() endif() + if(NOT "${GIT_DIR}" STREQUAL "") + # Reject a .git dir that belongs to a parent project (e.g. when fetched + # as a URL tarball with no .git of its own and _etl_git_find_closest_git_dir + # walked up into the consuming project's repository). Gated by the same + # flag as above, since CMAKE_CURRENT_SOURCE_DIR is always at or below + # CMAKE_SOURCE_DIR, so this check is strictly tighter than the one above + # and must honor the same opt-out. + file(RELATIVE_PATH _relative_etl_to_git "${CMAKE_CURRENT_SOURCE_DIR}" + "${GIT_DIR}") + if("${_relative_etl_to_git}" MATCHES "^[.][.]" AND NOT ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR) + set(GIT_DIR "") + endif() + endif() if("${GIT_DIR}" STREQUAL "") set(${_refspecvar} "GITDIR-NOTFOUND" diff --git a/docs/IO/_index.md b/docs/IO/_index.md new file mode 100644 index 00000000..8a93b851 --- /dev/null +++ b/docs/IO/_index.md @@ -0,0 +1,6 @@ +--- +title: "IO" +weight: 100 +--- + +Classes that address access to hardware. diff --git a/docs/IO/bip_buffer_spsc_atomic.md b/docs/IO/bip_buffer_spsc_atomic.md new file mode 100644 index 00000000..14b4cbfb --- /dev/null +++ b/docs/IO/bip_buffer_spsc_atomic.md @@ -0,0 +1,152 @@ +--- +title: "bip_buffer_spsc_atomic" +--- + +{{< callout >}} + Header: `bip_buffer_spsc_atomic.h` + Since: tbc +{{< /callout >}} + +A fixed capacity bipartite buffer. + +A bipartite buffer is a memory buffer design that uses two contiguous halves of the same underlying memory block to create a seamless, wraparound-free view of a circular/ring buffer's contents. + +**The Problem It Solves** +Ring buffers are efficient for streaming data, but when data wraps around the end of the buffer back to the beginning, reading a contiguous chunk across that boundary normally requires two separate reads or a temporary copy. + +**How It Works** +A bipartite buffer allocates a backing array that is twice the needed capacity. The two halves (the "bipartite" part) are mapped to the same physical memory, so: + +The first region covers indices 0 to N-1 +The second region covers indices N to 2N-1, but maps to the same memory as the first + +This means any contiguous slice of up to N bytes can always be read as a single, linear pointer — no wraparound, no copying, no splitting. + +```cpp +etl::bip_buffer_spsc_atomic +``` + +Inherits from `etl::ibip_buffer_spsc_atomic`. + +`etl::ibip_buffer_spsc_atomic` may be used as a size independent pointer or reference type for any `etl::bip_buffer_spsc_atomic instance`. + +## Member types + +`value_type` +`size_type` +`reference` +`const_reference` +`rvalue_reference` + +## Static Constants + +`MAX_SIZE` The maximum size of the circular_buffer. + +## Constructor +```cpp +etl::bip_buffer_spsc_atomic(); +``` + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the circular buffer is zero, otherwise `false`. + +--- + +```cpp +bool full() const +``` +**Description** +Returns `true` if the size of the circular buffer is `SIZE`, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the circular buffer. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the circular buffer. + +--- + +```cpp +size_t capacity() const +``` +**Description** +Returns the maximum possible size of the circular buffer. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the circular buffer. + +## Modifiers + +```cpp +etl::span read_reserve(size_type max_reserve_size = numeric_limits::max()) +``` +**Description** +Reserves a memory area for reading (up to the `max_reserve_size`). + +```cpp +void read_commit(const etl::span &reserve) +``` +**Description** +Commits the previously reserved read memory area +the reserve can be trimmed at the end before committing. +Throws `bip_buffer_reserve_invalid`. + +--- + +```cpp +etl::span write_reserve(size_type max_reserve_size) +``` +**Description** +Reserves a memory area for writing up to the `max_reserve_size`. + +--- + +```cpp +etl::span write_reserve_optimal(size_type min_reserve_size = 1U) +``` +**Description** +Reserves an optimal memory area for writing. The buffer will only wrap +around if the available forward space is less than `min_reserve_size`. + +--- + +```cpp +void write_commit(const etl::span &reserve) +``` +**Description** +Commits the previously reserved write memory area +the reserve can be trimmed at the end before committing. +Throws `bip_buffer_reserve_invalid` + +--- + +```cpp +void clear() +``` +**Description** +Clears the buffer, destructing any elements that haven't been read. + diff --git a/docs/IO/buffer_descriptors.md b/docs/IO/buffer_descriptors.md new file mode 100644 index 00000000..4e49278e --- /dev/null +++ b/docs/IO/buffer_descriptors.md @@ -0,0 +1,277 @@ +--- +title: "buffer_descriptors" +--- + +{{< callout >}} + Header: `buffer_descriptors.h` + Since: All versions +{{< /callout >}} + +A set of descriptors to a collection of buffers. + +```cpp +template // The 'in use' flag type. +class buffer_descriptors +``` + +The type used for the 'in use' flag depends on how the buffer descriptors class is used. +For interrupts and multi-threaded code, either the flag type must force a fence (by using an atomic type) or the calls to allocate and release must ensure that they are not re-ordered by the compiler or processor. + +## Member types +| Type | | +| ------------- | -------------------------------------------------------------------- | +| value_type | The type that is stored in the buffers | +| size_type | An unsigned integral type | +| flag_type | | +| pointer | | +| descriptor | A nested class that encapsulates the details of an individual buffer | +| notification | A nested class that is sent to the user defined callback function | +| callback_type | `etl::delegate` | + +## Static Constants +| Value | | +| ----------- | --------------------------------------------------------- | +| N_BUFFERS | The number of buffers that the buffer descriptor controls | +| BUFFER_SIZE | The number of elements in each buffer | + +## Constructors +```cpp +buffer_descriptors(pointer pbuffers) +``` +**Description** +Construct with a pointer to the start of the buffers to control. +This storage should be contiguous and large enough to hold `N_BUFFERS`. + +--- + +```cpp +buffer_descriptors(pointer pbuffers, const callback_type& callback) +``` +**Description** +Construct with a pointer to the start of the buffers to control and the callback. + +## Member functions + +```cpp +void set_callback(const callback_type& callback) +``` +**Description** +Set the callback for notification. + +--- + +```cpp +bool is_valid() const +``` +**Description** +Returns true if class contains valid buffers. + +--- + +```cpp +void notify(notification n) +``` +**Description** +Calls the user defined callback with the descriptor and buffer size. +Used when the buffer has been filled and is ready for processing via the callback. + +--- + +```cpp +descriptor allocate() +``` +**Description** +Returns a new descriptor. +If all descriptors are in use then the descriptor will be invalid. + +--- + +```cpp +descriptor allocate(value_type fill) +``` +**Description** +Returns a new descriptor and fills the buffer with fill. +If all descriptors are in use then the descriptor will be invalid. + +--- + +```cpp +void clear() +``` +**Description** +Clears by releasing all allocated descriptors. + +```cpp +descriptor +``` +**Description** +A nested class that encapsulates the details of an individual buffer. + +--- + +```cpp +const size_type MAX_SIZE +``` +**Description** +The maximum size of the buffer. + +--- + +```cpp +descriptor() +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR pointer data() const +``` +**Description** +Returns a pointer to the start of the buffer. + +--- + +```cpp +ETL_CONSTEXPR size_type max_size() const +``` +**Description** +Returns the maximum size of the buffer. + +--- + +```cpp +bool is_valid() const +``` +**Description** +Returns true if the descriptor points to a valid buffer. + +--- + +```cpp +bool is_allocated() const +``` +**Description** +Returns true if the descriptor has been allocated. + +--- + +```cpp +bool is_released() const +``` +**Description** +Returns true if the descriptor has been released. + +--- + +```cpp +void release() +``` +**Description** +Releases the descriptor. + +--- + +```cpp +notification +``` +**Description** +A nested class that is sent to the user defined callback function. + +--- + +```cpp +notification() +``` +**Description** +Default contructor. +Initialises to a default constructed descriptor and a count of zero. + +--- + +```cpp +notification(descriptor desc, size_t count) +``` +**Description** +Construct with the supplied parameters. + +--- + +```cpp +descriptor get_descriptor() const +``` +**Description** +Gets the descriptor. + +--- + +```cpp +size_t get_count() const +``` +**Description** +Gets the count. + +## Example +*Very simplified.* +Assumes that there is a DMA driver class called DMA. +In the real world the descriptor would be queued in the callback and handled in a foreground thread. +The handler in the thread would release the descriptor. + +```cpp +constexpr size_t BUFFER_SIZE = 256U; +constexpr size_t N_BUFFERS = 8U; + +// Define the buffer descriptors type. +using BD = etl::buffer_descriptors; + +// The buffers to use with it. +char buffers[N_BUFFERS][BUFFER_SIZE]; + +// The function to call when a buffer is ready. +void Callback(BD::notification notification) +{ + // Process the buffer in the descriptor here. + ProcessData(notification.get_descriptor().data(), notification.get_count()); + + // Finished with the descriptor now, so release it back. + notification.get_descriptor().release(); +} + +// Create the buffer_descriptors. +BD bd(&buffers[0][0], BD::callback_type::create()); + +// The current dma descriptor. +BD::descriptor dma_descriptor; + +// An object that controls the DMA. +DMA dma; + +// Call to start the DMA. +void DMAStart() +{ + // Get a new descriptor. + dma_descriptor = bd.allocate(); + + if (dma_descriptor.is_valid()) + { + // Link the buffer to the DMA channel. + dma.Start(dma_descriptor.data()); + } + else + { + // No valid descriptors available. + LogError("No Descriptor Available"); + } +} + +// Called when the DMA has completed (usually an interrupt). +void DMAComplete() +{ + // DMA is complete. Notify the callback. + bd.notify(BD::notification(dma_descriptor, dma.GetTransferredSize())); +} +``` diff --git a/docs/IO/debounce.md b/docs/IO/debounce.md new file mode 100644 index 00000000..502c1878 --- /dev/null +++ b/docs/IO/debounce.md @@ -0,0 +1,246 @@ +--- +title: "debounce" +--- + +{{< callout type="info">}} + Header: `debounce.h` + Since: `TBC` +{{< /callout >}} + +A class to debounce signals. + +It can detect signal hold, and generate auto repeat. + +```cpp +etl::debounce +``` + +There are four variants of the class which are selected at compile time according to the supplied template parameters. +All of the template parameters are optional. + +If the first parameter is supplied then the debouncer acts as a simple signal debounce. +The signal will become valid after `VALID_COUNT` identical samples have been added. + +If the second parameter is supplied then the debouncer will detect the signal being held true for `HOLD_COUNT` samples after becoming valid. + +If the third parameter is supplied then the debouncer will indicate that a change has occurred for the signal being held true for each `REPEAT_COUNT` that occurs after entering the hold state. + +If no template parameters are supplied then the template variant using internal variables is used. +This has similar parameters supplied to the constructor or the `set` member function. + +The diagram below shows the effect of the various parameters. + +![Debounce sequence](debounce.png) + +## Functions + +```cpp +debounce(bool initial_state = false) +``` +**Description** +Default constructor. + +`etl::debounce` + +The initial state defaults to: + +Initial state = `false` +Valid count = `Valid_Count` +Hold count = `Hold_Count` +Repeat count = `Repeat_Count` + +--- + +`etl::debounce` + +The initial state defaults to: + +Initial state = `false` +Valid count = `Valid_Count` +Hold count = `Hold_Count` +Repeat count = `0` (Disabled) + +--- + +`etl::debounce` + +The initial state defaults to: + +Initial state = `false` +Valid count = `Valid_Count` +Hold count = `0` (Disabled) +Repeat count = `0` (Disabled) + +--- + +`etl::debounce<>` + +The initial state defaults to: + +Initial state = `false` +Valid count = `1` +Hold count = `0` (Disabled) +Repeat count = `0` (Disabled) + +--- + +```cpp +debounce(bool initial_state, + uint16_t valid_count = 1, + uint16_t hold_count = 0, + uint16_t repeat_count = 0) +``` +**Description** +The constructor available when no template parameters are supplied. + +Valid count = `1` +Hold count = `0` (Disabled) +Repeat count = `0` (Disabled) + +--- + +```cpp +bool add(bool sample) +``` +**Description** +Adds a new signal sample. Returns true if the state of the debouncer becomes valid, held or repeating. + +```cpp +bool has_changed() const +``` +**Description** +Returns `true` if the state of the debouncer became valid, held or repeating after the last sample + +--- + +```cpp +bool is_set() const +``` +**Description** +Returns `true` if the debouncer is set, `false` if cleared. + +--- + +```cpp +bool is_held() const +``` +**Description** +Returns `true` if the debouncer signal is being held. + +--- + +```cpp +bool is_repeating() const +``` +**Description** +Returns `true` if the debouncer signal is repeating. + +--- + +```cpp +void set(uint16_t valid_count, uint16_t hold_count = 0, uint16_t repeat_count = 0) +``` +**Description** +Sets the debouncer parameters. +Only available when no template parameters are supplied. + +## Examples +```cpp +etl::debounce<20> debouncer; +``` +**Description** +Simple debounce. +Valid after 20 identical samples. + +--- + +```cpp +etl::debounce<20, 1000> debouncer; +``` +**Description** +Key debounce. +Valid after 20 identical samples. +Hold detection after 1000 'set' samples. + +--- + +```cpp +etl::debounce<20, 1000, 100> debouncer; +``` +**Description** +Key debounce with hold and auto repeat. +Valid after 20 identical samples. +Hold detection after 1000 'set' samples. +Repeat every 100 samples after hold. + +--- + +```cpp +etl::debounce<> debouncer; +debouncer.set(20, 1000, 100); +``` +**Description** +Key debounce with hold and auto repeat. +Runtime parameters. + +--- + +The example below targets the Arduino hardware. + +```cpp +//*********************************************************************************** +// A debounce demo that reads a key and toggles the LED. +// Set the pin to the correct one for your key. +//*********************************************************************************** + +#include + +// The sample time in ms. +const int Sample_Time = 1; + +// The number of samples that must agree before a key state change is recognised. +// 50 = 50ms for 1ms sample time. +const int Debounce_Count = 50; + +// The number of samples that must agree before a key held state is recognised. +// 1000 = 1s for 1ms sample time. +const int Hold_Count = 1000; + +// The number of samples that must agree before a key repeat state is recognised. +// 200 = 200ms for 1ms sample time. +const int Repeat_Count = 200; + +// The pin that the key is attached to. +const int Key = XX; + +void setup() +{ + // Initialize LED pin as an output. + pinMode(LED_BUILTIN , OUTPUT); + digitalWrite(LED_BUILTIN, LOW); + + // Initialize KEY pin as an input. + pinMode(KEY, INPUT); +} + +void loop() +{ + static int led_state = LOW; + static etl::debounce key_state; + + // Assumes 'HIGH' is 'pressed' and 'LOW' is 'released'. + if (key_state.add(digitalRead(KEY) == HIGH)) + { + if (key_state.is_set()) + { + // Toggle the LED state on every validated press or repeat. + led_state = (led_state == LOW ? HIGH : LOW); + digitalWrite(LED_BUILTIN, led_state); + } + } + + delay(1); // Wait 1ms +} +``` diff --git a/docs/IO/debounce.png b/docs/IO/debounce.png new file mode 100644 index 0000000000000000000000000000000000000000..bfc40a8ec417ae09046adb3c795ba98d919503da GIT binary patch literal 35073 zcmd43by(D07dASefRYBGvAXWfFRvD zNDtjGz%XYI&-3>CKHqizIM;W$E@hbd?Y)0%uXV3`-D|(ny{kq+N>2)bKq&60tK5S? z&R&2(2>s6ygJ;x2?=6F0XKfX=6(Nu>QDnyth``_H-PG@UKp=Fl@c#%xB5coqCrLc- zXseR^CL|*#yDIcj4!rjA?Hv_GgQpg&6BKm@(0bhFkL|wS&tAS%Kdb&y{bj4Fk_wyB zbsAOno#=~j8sY2HY?tEvXMOeVyz^I4p60m-=TK%BW*5RWt12m}u&c1KsVJp=6aKU< zkNRQJ(s9dUkJ0!D{J+rQh&1-=`jt>Wv?5$OyhF1ZPhlTzC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~*w|{4T4^KhFOS)sv^gkX_E9pwV;p^L}!%2JN+2Th_Y2uhgptE9x zG41z9e(&|gGfxn$q|(AEchOoQ7~8YYn`!Tfmss!SF$Fcd9M4N zBssG_D$(Kc=gavV#u+l=pX(wOTzvX#kydQ zgG{k(pv+#Q6pO+6LB?M@2!9}vo>=n_j!(c0XpWAf=H&;^wORiywENFub;Tdw=JRN9 V#VB5CCZX@_jJlp$@ku-Ue*qCBJt_bI literal 0 HcmV?d00001 diff --git a/docs/IO/io_port.md b/docs/IO/io_port.md new file mode 100644 index 00000000..fce94395 --- /dev/null +++ b/docs/IO/io_port.md @@ -0,0 +1,411 @@ +--- +title: "io_port" +--- + +{{< callout type="info">}} + Header: `io_port.h` + From: `20.39.0` +{{< /callout >}} + +A set of templates for building interface classes to memory mapped hardware ports. +They avoid the need to directly map carefully packed (and possibly non-portable) structures onto memory addresses. + +>A read from a write-only, or write to a read-only port will result in a compile time error. + +**Defines classes for the following IO types** +Read / Write. +Read only. +Write only. +Write only with shadow register. + +With a shadow register the value written is stored locally and may be read back. + +The port may either have an address fixed at compile time or set at runtime. The compile time versions require no extra overhead compared to a plain memory mapped structure. + +Ports may be sent as parameters to algorithms that expect iterators, except the runtime address version of `io_port_wos`, which must use the built-in iterator if the shadow value is to be correctly updated for writes. + +All classes define the following typedefs. + +| Type name | Maps to | +| ----------------- | ------------------- | +| `value_type` | `T` | +| `pointer` | `volatile T*` | +| `const_pointer` | `volatile const T*` | +| `reference` | `volatile T&` | +| `const_reference` | `volatile const T&` | + +## Read/write port +```cpp +io_port_rw +``` +**Description** +Compile time port address. + +--- + +**Types** +iterator +const_iterator + +--- + +```cpp +operator T() const +``` +**Description** +Read the value. +Conversion operator to T. + +--- + +```cpp +iterator iter() +``` +**Description** +Get an iterator to this port. + +--- + +```cpp +const_iterator iter() const +const_iterator citer() const +``` +**Description** +Get a const_iterator to this port. + +--- + +```cpp +T read() const +``` +**Description** +Read the value. + +--- + +```cpp +void write(T value) +``` +**Description** +Write the value. + +--- + +```cpp +io_port_rw& operator =(T value) +``` +**Description** +Write the value. + +--- + +```cpp +pointer get_address() +const_pointer get_address() const +``` +**Description** +Gets the address of the port. + +--- + +```cpp +io_port_rw& operator |=(value_type value) +``` +**Description** +Or-Equals operator. + +--- + +```cpp +io_port_rw& operator &=(value_type value) +``` +**Description** +And-Equals operator. + +--- + +```cpp +io_port_rw& operator ^=(value_type value) +``` +**Description** +Exclusive-Or-Equals operator. + +--- + +```cpp +io_port_rw& operator <<=(int shift) +``` +**Description** +Left-Shift-Equals operator. + +--- + +```cpp +io_port_rw& operator >>=(int shift) +``` +**Description** +Right-Shift-Equals operator. + +--- + +```cpp +value_type operator ~() const +``` +**Description** +Not operator. + +## Read only port +```cpp +io_port_ro +``` + +--- + +**Types** +```cpp +const_iterator +``` + +--- + +```cpp +operator T() const +``` +**Description** +Read the value. Conversion operator to T. + +--- + +```cpp +const_iterator iter() const +const_iterator citer() const +``` +**Description** +Get a const_iterator to this port. + +--- + +```cpp +T read() const +``` +**Description** +Read the value. + +--- + +```cpp +const_pointer get_address() const +``` +**Description** +Gets the address of the port. + +## Write only port +```cpp +io_port_wo +``` + +--- + +**Types** +iterator + +--- + +```cpp +iterator iter() +``` +**Description** +Get an iterator to this port. + +--- + +```cpp +void write(T value) +``` +**Description** +Write the value. + +--- + +```cpp +io_port_wo& operator =(T value) +``` +**Description** +Write the value. + +--- + +```cpp +pointer get_address() +``` +**Description** +Gets the address of the port. + +## Write only port, with shadow register +```cpp +io_port_wos +``` + +--- + +**Types** +```cpp +iterator +const_iterator +``` + +--- + +```cpp +operator T() const +``` +**Description** +Read the value. Conversion operator to `T`. + +--- + +```cpp +iterator iter() +``` +**Description** +Get an iterator to this port. + +--- + +```cpp +const_iterator iter() const +const_iterator citer() const +``` +**Description** +Get a `const_iterator` to this port. + +--- + +```cpp +T read() const +``` +**Description** +Read the value. + +--- + +```cpp +void write(T value) +``` +**Description** +Write the value. + +--- + +```cpp +io_port_rw& operator =(T value) +``` +**Description** +Write the value. + +--- + +```cpp +pointer get_address() +const_pointer get_address() const +``` +**Description** +Gets the address of the port. + +--- + +```cpp +io_port_rw& operator |=(value_type value) +``` +**Description** +Or-Equals operator. + +--- +```cpp +io_port_rw& operator &=(value_type value) +``` +**Description** +And-Equals operator. + +--- + +```cpp +io_port_rw& operator ^=(value_type value) +``` +**Description** +Exclusive-Or-Equals operator. + +--- + +```cpp +io_port_rw& operator <<=(int shift) +``` +**Description** +Left-Shift-Equals operator. + +--- + +```cpp +io_port_rw& operator >>=(int shift) +``` +**Description** +Right-Shift-Equals operator. + +--- + +```cpp +value_type operator ~() const +``` +**description** +Not operator. + +## Example serial port + +The example uses a port at a compile time address. + +| Variable | Description | +| --------- | ---------------------------------------------------------- | +| `rxdata` | An 8 bit read only port | +| `txdata` | An 8 bit write only port | +| `control` | A 16 bit write only port, with shadow register | +| `status` | A 16 bit read only port. It shares an address with control | +| `option` | An 8 bit read/write port | + +```cpp +template +struct serial_port +{ + etl::io_port_ro rxdata; // Read only rx data register. + etl::io_port_wo txdata; // Write only tx register. + etl::io_port_wos control; // Write only, with shadow, control register. + etl::io_port_ro status; // Read only status register. + etl::io_port_ro option; // Read/Write register. +}; + +serial_port<0x800> port; // A serial port at address 0x800 + +// Read Rx data +char data = port.rxdata; + +// Write Tx data +port.txdata = 'A'; + +// Compile error! txdata is write only. +data = port.txdata; + +// Write to the control register and read back what we wrote. +port.control = 0x1234; +uint16_t control = port.control; + +// Flip bit 3 of the control register. +port.control ^= 0x0080; + +// Read from the status register. +uint16_t status = port.status; + +// Copy data from a buffer to the Tx data port. +std::copy(txBuffer.begin(), txBuffer.end(), port.txdata.iter()); + +// Copy data from the Rx data port to a buffer. +std::copy_n(port.rxdata.iter(), status, std::back_inserter(rxBuffer)); +``` diff --git a/docs/Is the ETL free.md b/docs/Is the ETL free.md new file mode 100644 index 00000000..013c47a3 --- /dev/null +++ b/docs/Is the ETL free.md @@ -0,0 +1,75 @@ +--- +title: "Is the ETL free?" +# Force it to the top of the list +weight: 1 +# Disable the Table of Contents entirely for this page +toc: false +--- + +The ETL is free for you or your company to use, including in commercial applications. + +*However, it is not free for me to create or maintain.* + +## Why Open Source Needs Support + +Development, support, documentation, testing, and hosting all require time and resources. +*Currently, this work is carried entirely by me, usually without compensation.* + +As the ETL has grown in functionality and popularity, so has the workload. In some weeks, maintaining the project takes over 30 hours. Without financial support, this is difficult to sustain alongside paid work and personal obligations. + +## Why Sponsor the Embedded Template Library (ETL)? + +The Embedded Template Library (ETL) is a modern, high-performance C++ library designed specifically for embedded systems. It provides STL-like functionality for environments where efficiency, reliability, and low overhead are essential. + +The ETL is used by hobbyists, engineers, and international companies developing commercial embedded products. Yet it is maintained by a single developer in their spare time. + +If the ETL has helped your project or become part of your development toolset, please consider supporting its continued growth. + +## Why Sponsorship Matters + +- **Sustainability** +Ongoing support helps keep the library maintained and up to date. +- **Reliability** +Sponsorship allows for regular testing, bug fixes, and improvements. +- **Responsibility** +Supporting the tools you depend on strengthens the software ecosystem. +- **Recognition** +Sponsors can be publicly acknowledged if desired. + +Whether you use the ETL in personal projects or commercial products, your support helps keep it available and improving. + +The ETL began as a way to share years of embedded development experience. Since 2014, it has grown into a feature-rich and widely used library. +*But it is still powered by one developer, without corporate funding.* + +If you or your company benefit from the ETL, please consider becoming a sponsor. Even small contributions help cover hosting, tools, and time spent supporting the library and its users. + +[Why CFOs should care about Open Source software](https://opensourcepledge.com/blog/CFOs-care-about-OSS/) + +## How to sponsor + +There are two ways that you can help me with the maintenance and further development of the library. + +**Through the GitHub donations link.** +[Github sponsors](https://github.com/sponsors/ETLCPP) + +--- + +**By direct bank transfer** + Donations are accepted in many world currencies. + AED, AUD, BGN, CAD, CHF, CLP, COP, CZK, DKK, EGP, EUR, GBP, HKD, HUF, ILS, INR, ISK, JPY, KRW, + KZT, MAD, MXN, NOK, NZD, PHP, PLN, QAR, RON, RSD, SAR, SEK, SGD, THB, TRY, USD, ZAR + + I can supply invoices for companies that require one for accounting and tax purposes. + +**UK** +Beneficiary John Wellbelove +Account 12655643 +Sort code 04-00-75 + +**Swift (International)** +Beneficiary John Wellbelove +IBAN GB17 REVO 0099 7000 7513 26 +BIC REVOGB21 + +Many thanks for any support you can give to keep this project actively supported, +*John Wellbelove* diff --git a/docs/_index.md b/docs/_index.md new file mode 100644 index 00000000..e6f75a2e --- /dev/null +++ b/docs/_index.md @@ -0,0 +1,131 @@ +--- +title: "Embedded Template Library" +weight: 998 +type: hextra-home +--- + +
+ +
+ release + date + standard + license + contributors + forks + stars +
+ +
+ CI MSVC +
+ +
+ CI GCC 11 + CI GCC 14 + CI GCC 17 + CI GCC 20 + CI GCC 23 + CI GCC syntax +
+ +
+ CI Clang 11 + CI Clang 14 + CI Clang 17 + CI Clang 20 + CI Clang 23 + CI Clang syntax +
+ +
+ coverage + Codacy +
+ +
+ Sponsor +
+ +
+ +## Version +This documents version **{{< version >}}**. + +## Motivation + +C++ is a powerful language for embedded systems development, with templates offering a great deal of flexibility and type safety. While the C++ Standard Library provides a wealth of well-tested functionality, it’s often not well suited to environments with strict deterministic behavior and limited resources. + +In many embedded applications, dynamic memory allocation is discouraged or outright prohibited, making standard STL containers and many other components impractical or unusable. + +What’s needed is a template library specifically designed for embedded systems — one that allows developers to define fixed or maximum sizes for containers and other objects at compile time. Additionally, since many older (but still in use) embedded toolchains lack full support for standards beyond C++03, it's valuable to have access to a library that backports select features from later versions of the C++ Standard Library. + +## About the ETL + +The Embedded Template Library (ETL) is not intended as a full replacement for the C++ Standard Template Library (STL), but rather as a complementary solution tailored specifically for embedded systems. + +**Its design goals include** + +- Providing a set of containers with fixed or maximum sizes defined at compile-time. +- Offering APIs that closely resemble those of the STL, enabling familiar and consistent usage. +- Maintaining compatibility with C++98 while implementing many features introduced in later standards +(C++11/14/17/20/23/26) wherever possible. +- Ensuring deterministic behavior, which is critical in real-time and resource-constrained environments. +- Introducing additional components and utilities useful in embedded contexts but absent from the STL. +- The ETL avoids dynamic memory allocation entirely; the heap is never used. All non-intrusive containers have a fixed capacity, allowing memory requirements to be fully determined at compile-time. This makes the ETL ideal for lower-resource embedded applications where predictability, performance, and memory control are essential. + +The library is compatible with any compiler that supports C++03 or later. + +Help on integrating the ETL with your project may be found here. + +## Key Features of the ETL + +- Actively Maintained: Developed and maintained on GitHub since 2014. +- Open Source: MIT licensed. +- No STL Dependency: Designed to operate independently of the C++ Standard Template Library. +- No Dynamic Memory Allocation: All storage is allocated either at compile-time or on the stack; heap usage is entirely avoided. +- RTTI and Virtual Functions: No runtime type information (RTTI) is required. Virtual functions are used sparingly and only when strictly necessary. +- Header-Only Library: All functionality is provided via header files; No separate compilation needed. +- Fixed-Capacity Containers: Offers STL-like containers with fixed or maximum capacity, plus additional non-standard container types. +- Cache Efficiency: Containers use contiguous memory layouts for optimal cache performance. +- Compact Codebase: Shared base classes (based on type) help reduce overall container code size. +- Compile-Time Features: +Templated compile-time constants +Template-based design pattern base classes (e.g., Visitor, Observer) +Type-safe smart enumerations +Type-safe typedefs and constants +- Embedded System Frameworks: +Message routing +Finite state machines +Task scheduling +- C++11 Backports: +Implements many C++11 features (type traits, algorithms, containers) for use in C++03 environments. +- Utilities: +CRC calculations (8, 16, 32 & 64-bit) +Checksums and hash functions +- Variants (type-safe unions) +- Extensive template support utilities +- Robust Error Handling: Configurable error checking using asserts, exceptions, error handlers, or no checks; user’s choice. +- Thoroughly Tested: +Over 10,000 unit tests +Tested with Visual Studio 2022, GCC 12, and Clang 14 +Continuous integration via GitHub Actions. +- Readable and Well-Documented: Clean, maintainable source code with clear documentation. +- Support: Free email support available. A Slack group is available. Paid support on request. +- Archived: A snapshot of the ETL is preserved in the Arctic Code Vault for long-term digital preservation. + +## Support the ETL +Maintaining the ETL can take a lot of man-hours of work, but unfortunately it doesn't pay the bills. When I have to take on paying work, the ETL gets a lot less attention. So if you have found the library is an important component in your work and you would like to help out, then please consider by supporting the project. + +--- + +[**Is the ETL free?**]({{< relref "is the ETL free.md" >}}) + +--- + +Any help porting the library to work under different platforms and compilers would be gratefully received. +I am especially interested in people who are using Keil, IAR, Green Hills, TI Code Composer etc, bare metal +or RTOS, and DSPs. + +Many thanks. +John. diff --git a/docs/about.md b/docs/about.md new file mode 100644 index 00000000..6068aea1 --- /dev/null +++ b/docs/about.md @@ -0,0 +1,56 @@ +--- +title: "About" +weight: 3002 +--- + +## About me +I have been involved in technology and computer systems for all of my working life and have amassed considerable knowledge of designing and implementing systems that are both performant and correct. +My role normally encompasses the entire project life-cycle, from specification to maintenance phase. + +Most systems I have worked on have required high speed and deterministic performance, often within a highly constrained platform. I am experienced in designing and adapting algorithms to solutions that are both space and time efficient, avoiding the normal overheads of standard solutions. + +Acting as a mentor for colleagues has often been a significant, though unofficial, part of my role. + +## Why write this library? +I wrote this library, and all the others I have written over the +years, because I'm lazy. + +Yes, lazy! + +One of the things I really hate when writing software is having to do the same, or something almost the same, over and over again. The first thing I think when presented with a problem that requires a specific set of functionality is "Is this a specific case of a more generic problem?". Surprisingly, I can say "yes" more often than you would expect. Even if not all of the problem can be seen as generic, there are almost certainly parts that are. In every job I've had I've left an extensive code library behind me. + +Reinventing the wheel every time is a bad idea, for many reasons. + +- **Compile-Time Features:** +Templated compile-time constants +Template-based design pattern base classes (e.g., Visitor, Observer) +Type-safe smart enumerations +Type-safe typedefs and constants +- **Code Bloat** +Multiple instances of slight variations of a theme results in an increase in code size due to no commonality of functionality. +Testing, more testing or no testing. +Are all the variants tested to the same degree? +Are some tested at all? +- **Variable functionality** +Not all the variants are going to have the same level of functionality, or the same API. +Ad-hoc solutions are invariably only going to solve the little bit of the problem that was needed at the time. +This goes against the YAGNI principle, but... +*I think that YAGNI can often be just another way of saying ISEP.* +*I believe in GIRFT.* +*I have over three decades of empirical proof.* +- **No collective knowledge base** +Without commonality every new variant has to be learnt. The underlying principles may be understood (i.e. Linked list), but each implementation has to be understood separately, along with its particular caveats and foibles. +Documentation is likely to be patchy, if it exists at all. +- **Octopus code** +The application is liable to have a close coupling with the solution. For example, I've often seen code using linked lists directly accessing the node pointers. Ad-hoc solutions are liable to have lazy (the bad kind) implementations. + +>YAGNI - You Aren't Going To Need It +>ISEP - It's Somebody Else's Problem +>GIRFT - Get It Right First Time + +## Why not use 'C'? +**Greenspun's Tenth Rule** has an unofficial C corollary: +*"Any sufficiently advanced C program contains an ad hoc, informally specified, bug-ridden, slow implementation of half of C++."* + +I spent 12 years programming in pure C. +I discovered that I had been reverse engineering C++ all that time. diff --git a/docs/binary/_index.md b/docs/binary/_index.md new file mode 100644 index 00000000..2e3e32da --- /dev/null +++ b/docs/binary/_index.md @@ -0,0 +1,6 @@ +--- +title: "Binary utilities" +weight: 100 +--- + +Classes and functions that define and manipulate binary data. \ No newline at end of file diff --git a/docs/binary/binary.md b/docs/binary/binary.md new file mode 100644 index 00000000..f9fd0594 --- /dev/null +++ b/docs/binary/binary.md @@ -0,0 +1,574 @@ +--- +title: binary +--- + +{{< callout type="info">}} + Header: `binary.h` + Since: `TBC` +{{< /callout >}} + +Utility functions for manipulating binary numbers. + +## Rotate +Rotate the bits in the value left or right. + +```cpp +template +ETL_CONSTEXPR14 T rotate_left(T value) +``` +**Return** +`value` rotated left by one bit. + +```cpp +template +ETL_CONSTEXPR14 T rotate_left(T value, size_t distance) +``` +**Return** +`value` rotated left by `distance`. + +```cpp +template +ETL_CONSTEXPR14 T rotate_right(T value) +``` +**Return** +`value` rotated right by one bit. + +```cpp +template +ETL_CONSTEXPR14 T rotate_right(T value, size_t distance) +``` +**Return** +`value` rotated right by `distance`. + +```cpp +template +ETL_CONSTEXPR14 T rotate(T value, typename etl::make_signed::type distance) +``` +**Parameters** +`distance` Positive is left, negative is right. +**Return** +`value` rotated left or right by `distance`. + +## reverse_bits +Reverse the order of the bits in a value. + +```cpp +template +ETL_CONSTEXPR14 T reverse_bits(T value) +``` + +The structures below define a member constant value that is Value reversed in bits. +```cpp +template +struct reverse_bits_const +``` +```cpp +template +struct reverse_bits_const +``` +```cpp +template +struct reverse_bits_const +``` +```cpp +template +struct reverse_bits_const +``` +```cpp +template +struct reverse_bits_const +``` +```cpp +template +struct reverse_bits_const +``` +```cpp +template +struct reverse_bits_const +``` +```cpp +template +struct reverse_bits_const +``` + +Defines `value` The reversed bits. + +## reverse_bytes +Reverse the order of the bytes in a value. + +```cpp +template +ETL_CONSTEXPR14 T reverse_bytes(T value) +``` + +## gray_to_binary +```cpp +template +ETL_CONSTEXPR14 T gray_to_binary(T value) +``` +Converts a gray code value to binary. + +## binary_to_gray +```cpp +template +ETL_CONSTEXPR T binary_to_gray(T value) +``` +Converts a binary value to the gray code equivalent. + +## count_bits +```cpp +template +ETL_CONSTEXPR14 uint_least8_t count_bits(T value) +``` +**Return** +The number of set bits in `value`. + +## parity +```cpp +template +ETL_CONSTEXPR14 uint_least8_t parity(T value) +``` +**Return** +`1` if the parity of the value is odd, `0` if it is even. + +## max_value_for_nbits +```cpp +template +struct max_value_for_nbits +``` +**Return** +Maximum unsigned value a particular number of bits can represent. + +`value_type` The type for the value. +`value` The maximum value. + +## fold_bits +```cpp +template +ETL_CONSTEXPR14 TReturn fold_bits(TValue value) +``` +**Description** +Fold a binary number down to a set number of bits using XOR. + +**Example** +`0xE8C9AACCBC3D9A8F` folded down to 20 bits = `0x998E8` + +```cpp +uint32_t result = etl::fold_bits(0xE8C9AACCBC3D9A8F); +``` + +## sign_extend +Sign extends a binary number. + +```cpp +template +ETL_CONSTEXPR14 TReturn sign_extend(TValue value) +``` +**Description** +Converts an N bit binary number, where bit N-1 is the sign bit, to a signed integral type. + +--- +```cpp +template +ETL_CONSTEXPR14 TReturn sign_extend(TValue value) +``` +**Description** +Converts an N bit binary number, where bit N-1 is the sign bit, and `Shift` is the right shift amount, to a signed integral type. + +--- + +```cpp +template +ETL_CONSTEXPR14 TReturn sign_extend(TValue value, size_t nbits) +``` +**Description** +Converts an N bit binary number, where bit N-1 is the sign bit, to a signed integral type. + +--- + +```cpp +template +ETL_CONSTEXPR14 TReturn sign_extend(TValue value, size_t nbits, size_t shift) +``` +**Description** +Converts an N bit binary number, where bit N-1 is the sign bit, and shift is the right shift amount, to a signed integral type. + +## count_leading_zeros +```cpp +template +ETL_CONSTEXPR14 uint_least8_t count_leading_zeros(T value) +``` +**Description** +Counts the number of leading zeros in a binary number + +## count_trailing_zeros +```cpp +template +ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(T value) +``` +**Description** +Counts the number of trailing zeros in a binary number + +## count_leading_ones +```cpp +template +ETL_CONSTEXPR14 uint_least8_t count_leading_ones(T value) +``` +**Description** +Counts the number of leading ones in a binary number + +## count_trailing_ones +```cpp +template +ETL_CONSTEXPR14 uint_least8_t count_trailing_ones(T value) +``` +**Description** +Counts the number of trailing ones in a binary number + +## first_set_bit_position +```cpp +template +ETL_CONSTEXPR14 uint_least8_t first_set_bit_position(T value) +``` +**Description** +Finds the index of the first set bit from lsb. + +## first_clear_bit_position +```cpp +template +ETL_CONSTEXPR14 uint_least8_t first_clear_bit_position(T value) +``` +**Description** +Finds the index of the first clear bit from lsb. + +## first_bit_position +```cpp +template +ETL_CONSTEXPR14 uint_least8_t first_bit_position(bool state, T value) +``` +**Description** +Finds the index of the first bit in the specified state, from lsb. + +## binary_fill +```cpp +template +ETL_CONSTEXPR TResult binary_fill(TValue value) +``` +Fills a value of the specified width with a repeating binary pattern. +*Run time* + +Generate `0x12121212` +```cpp +etl::binary_fill(uint8_t(0x12)); +``` + +--- + +```cpp +template +ETL_CONSTEXPR TResult binary_fill() +``` +*Partial compile time* + +Generate `0x12121212` +```cpp +etl::binary_fill(); +``` + +## has_zero_byte +```cpp +template +ETL_CONSTEXPR14 bool has_zero_byte(TValue value) +``` +*Run time* +Checks to see if a value contains a byte of value zero. + +**Example** +`etl::has_zero_byte(uint32_t(0x01234567)) == false` +`etl::has_zero_byte(uint32_t(0x01230067)) == true` + +--- + +```cpp +template +ETL_CONSTEXPR14 bool has_zero_byte() +``` +Checks to see if `Value` contains a byte of value zero. +*Compile time value* + +## has_byte_n +Checks to see if a value contains a byte of a particular value. + +```cpp +template +ETL_CONSTEXPR14 bool has_byte_n(TValue value, uint8_t n) +``` +*Run time* + +```cpp +etl::has_byte_n(uint32_t(0x01234567), 0x12) == false +etl::has_byte_n(uint32_t(0x01234567), 0x45) == true +``` + +--- + +```cpp +template +ETL_CONSTEXPR14 bool has_byte_n(TValue value) +``` +*Partial compile time* + +```cpp +etl::has_byte_n<0x12>(uint32_t(0x01234567)) == false +etl::has_byte_n<0x45>(uint32_t(0x01234567)) == true +``` + +## binary_merge +Merges two binary values according to a mask. +Bits set in the mask select bits in the first value, clear bits select those in the second. + +```cpp +template +ETL_CONSTEXPR T binary_merge(T first, T second, T mask) +``` +```cpp +uint8_t first = 0x12; +uint8_t second = 0x34; + +const uint8_t mask = 0xF0; + +etl::binary_merge(first, second, mask) Equals 0x14 +``` + +--- + +```cpp +template +ETL_CONSTEXPR T binary_merge(T first, T second) +``` + +```cpp +uint8_t first = 0x12; +uint8_t second = 0x34; + +const uint8_t mask = 0xF0; + +etl::binary_merge(first, second) Equals 0x14 +``` + +## binary_interleave +Interleaves two values such that bits abcd and efgh will result in eafbgchd. + +```cpp +ETL_CONSTEXPR14 uint16_t binary_interleave(uint8_t first, uint8_t second); +ETL_CONSTEXPR14 uint32_t binary_interleave(uint16_t first, uint16_t second); +ETL_CONSTEXPR14 uint64_t binary_interleave(uint32_t first, uint32_t second); +``` + +## Odd / Even +Determines the odd or evenness of a value. + +```cpp +template +ETL_CONSTEXPR bool is_odd(T value) +``` + +```cpp +template +ETL_CONSTEXPR bool is_even(T value) +``` + +## Constants +```cpp +enum binary_constant +``` +An enumeration of 256 constants from `b00000000` to `b11111111` (`0` to `255`) + +--- + +```cpp +enum bit_constant +``` +An enumeration of 32 constants from `b0` to `b31` (`1` to `4294967296`) + +--- + +```cpp +template +struct bit +``` + +`value_type` The type of the value. +`value` The value of the bit at `Position`. + +## Creating bit masks +These classes and constexpr functions help create lsb and msb masks. + +```cpp +template +class lsb_mask; +``` +Defines the member constant value as a binary value of NBits `1` shift to the LSB. +e.g. `lsb_mask::value == 0b00000111` +From: `20.34.0` + +--- + +```cpp +template +ETL_CONSTEXPR T make_lsb_mask(size_t nbits) +``` +Returns a binary value of nbits `1` shift to the LSB. +e.g. `make_lsb_mask(3) == 0b00000111` +From: `20.34.0` + +--- + +```cpp +template +ETL_CONSTEXPR T make_lsb_mask() +``` +**Description** +Returns a binary value of nbits `1` shift to the LSB. +e.g. `make_lsb_mask() == 0b00000111` +From: `20.38.7` + +--- + +```cpp +template +class msb_mask; +``` +**Return** +A binary value of nbits `1` shift to the MSB. +e.g. `msb_mask::value == 0b11100000` +From: `20.34.0` + +--- + +```cpp +template +ETL_CONSTEXPR T make_msb_mask(size_t nbits) +``` +**Description** +Defines the member constant value as a binary value of NBits `1` shift to the MSB. +e.g. `make_msb_mask(3) == 0b11100000` +20.34.0 + +--- + +```cpp +template +ETL_CONSTEXPR T make_msb_mask() +``` +**Description** +Defines the member constant value as a binary value of NBits `1` shift to the MSB. +e.g. `make_msb_mask() == 0b11100000` +From: `20.38.7` + +## Bit manipulation functors +These functors are most useful where lambdas are not available. + +## binary_not +```cpp +template +struct binary_not : public etl::unary_function; +``` +From: `20.38.11` + +--- + +```cpp +ETL_CONSTEXPR +binary_not() +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR +ETL_NODISCARD +T operator()(T value) const ETL_NOEXCEPT +``` +**Return** +~value. + +## binary_and +```cpp +template +struct binary_and : public etl::unary_function; +``` +From: `20.38.11` + +--- + +```cpp +ETL_CONSTEXPR +explicit binary_and(T and_value) +``` +**Description** +Constructor. + +--- + +```cpp +ETL_CONSTEXPR +ETL_NODISCARD +T operator()(T value) const ETL_NOEXCEPT +``` +**Return** +`value & and_value`. + +## binary_or +```cpp +template +struct binary_or : public etl::unary_function; +``` +From: `20.38.11` + +--- + +```cpp +ETL_CONSTEXPR +explicit binary_or(T or_value) +``` +**Description** +Constructor. + +--- + +```cpp +ETL_CONSTEXPR +ETL_NODISCARD +T operator()(T value) const ETL_NOEXCEPT +``` +**Return** +`value | or_value`. + +## binary_xor +```cpp +template +struct binary_xor : public etl::unary_function; +``` +From: `20.38.11` + +--- + +```cpp +ETL_CONSTEXPR +explicit binary_xor(T xor_value) +``` +**Description** +Constructor. + +--- + +```cpp +ETL_CONSTEXPR +ETL_NODISCARD +T operator()(T value) const ETL_NOEXCEPT +``` +**Return** +value ^ xor_value. diff --git a/docs/binary/bit.md b/docs/binary/bit.md new file mode 100644 index 00000000..ec88ec11 --- /dev/null +++ b/docs/binary/bit.md @@ -0,0 +1,117 @@ +--- +title: "bit" +--- + +{{< callout type="info">}} + Header: `bit.h` + Since: `TBC` + Similar to: [STL bit header](https://en.cppreference.com/cpp/header/bit) +{{< /callout >}} + +Utility functions for manipulating binary numbers. +A reverse engineered version of C++20's and C++23's `` header. + +## bit_cast +```cpp +template +ETL_CONSTEXPR14 TDestination bit_cast(const TSource& source) ETL_NOEXCEPT +``` +**Description** +Returns a value of type `TDestination` by reinterpreting the `TSource` object. + +## byteswap +```cpp +template +ETL_CONSTEXPR14 T byteswap(T n) ETL_NOEXCEPT +``` +**Description** +Reverses the bytes in `n`. + +## has_single_bit +```cpp +template +ETL_CONSTEXPR14 bool has_single_bit(T n) ETL_NOEXCEPT +``` +**Description** +Checks if `n` is a power of two, or has one bit set. + +## bit_ceil +```cpp +template +ETL_CONSTEXPR14 T bit_ceil(T n) +``` +**Description** +Calculates the smallest power of two, that is not smaller than `n`. + +## bit_floor +```cpp +template +ETL_CONSTEXPR14 T bit_floor(T n) ETL_NOEXCEPT +``` +**Description** +Calculates the largest power of two that is not greater than `n`. + +## bit_width +```cpp +template +ETL_CONSTEXPR14 T bit_width(T n) ETL_NOEXCEPT +``` +**Description** +If `n` is not `0`, calculates the number of bits needed to store it. +If `n` is `0`, then the result is `0`. + +## rotl +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR14 T rotl(T value, int n) ETL_NOEXCEPT +``` +**Description** +Computes a left circular shift of value by `n`. + +## rotr +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR14 T rotr(T value, int n) ETL_NOEXCEPT +``` +**Description** +Computes a right circular shift of value by `n`. + +## countl_zero +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR14 int countl_zero(T value) ETL_NOEXCEPT +``` +**Description** +Returns the number of consecutive `0` bits in `n`, starting from the most significant bit (left). + +## countl_one +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR14 int countl_one(T value) ETL_NOEXCEPT +``` +**Description** +Returns the number of consecutive `1` bits in `n`, starting from the most significant bit (left). + +## countr_zero +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR14 int countr_zero(T value) ETL_NOEXCEPT +``` +**Description** +Returns the number of consecutive `0` bits in `n`, starting from the least significant bit (right). + +## countr_one +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR14 int countr_one(T value) ETL_NOEXCEPT +``` +**Description** +Returns the number of consecutive `1` bits in `n`, starting from the least significant bit (right). + +## popcount +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR14 int popcount(T value) ETL_NOEXCEPT +``` +**Description** +Counts the number of `1` bits in an unsigned integer. diff --git a/docs/binary/byte.md b/docs/binary/byte.md new file mode 100644 index 00000000..0e878b3e --- /dev/null +++ b/docs/binary/byte.md @@ -0,0 +1,149 @@ +--- +title: "byte" +--- + +{{< callout type="info">}} + Header: `byte.h` + From: `20.24.0` + Similar to: [std::byte](https://en.cppreference.com/cpp/types/byte) +{{< /callout >}} + +A type that implements the concept of byte + +**C++03** +Implemented as a class. +Cannot be cast using `static_cast`. + +**C++11 or above** +Implemented as enum class. +All functions are `constexpr`. + +## Constructors +```cpp +byte() +``` +**Description** +Constructs a default initialised byte. +C++03 + +--- + +```cpp +template +explicit byte(T v) +``` +Constructs a byte initialised to `v`. + +## Non-member functions +```cpp +template +constexpr TInteger to_integer(etl::byte b) noexcept +``` +**Description** +Converts to an integral type. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +template +constexpr etl::byte operator <<(etl::byte b, TInteger shift) noexcept +``` +**Description** +Shifts the value of the byte to the left and returns the new byte. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +template +constexpr etl::byte operator >>(etl::byte b, TInteger shift) noexcept +``` +**Description** +Shifts the value of the byte to the right and returns the new byte. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +template +constexpr etl::byte& operator <<=(etl::byte& b, TInteger shift) noexcept +``` +**Description** +Shifts the value of the byte to the left and returns a reference to the byte. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +template +constexpr etl::byte& operator >>=(etl::byte& b, TInteger shift) noexcept +``` +**Description** +Shifts the value of the byte to the right and returns a reference to the byte. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +constexpr etl::byte operator |(etl::byte lhs, etl::byte rhs) noexcept +``` +ORs the two bytes returns the new byte. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +constexpr etl::byte operator &(etl::byte lhs, etl::byte rhs) noexcept +``` +**Description** +ANDs the two bytes returns the new byte. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +constexpr etl::byte operator ^(etl::byte lhs, etl::byte rhs) noexcept +``` +**Description** +Exclusive ORs the two bytes returns the new byte. +`constexpr` and `noexcept` for C++11 and above. + +--- + +```cpp +constexpr etl::byte& operator |=(etl::byte& lhs, etl::byte rhs) noexcept +``` +**Description** +ORs the two bytes returns and a reference to the first parameter. +`constexpr` for C++14 and above. +`noexcept` for C++11 and above. + +--- + +```cpp +constexpr etl::byte& operator &=(etl::byte& lhs, etl::byte rhs) noexcept +``` +**Description** +ANDs the two bytes returns and a reference to the first parameter. +`constexpr` for C++14 and above. +`noexcept` for C++11 and above. + +--- + +```cpp +constexpr etl::byte& operator ^=(etl::byte& lhs, etl::byte rhs) noexcept +``` +**Description** +Exclusive ORs the two bytes and returns a reference to the first parameter. +`constexpr` for C++14 and above. +`noexcept` for C++11 and above. + +--- + +```cpp +constexpr etl::byte operator ~(etl::byte b) noexcept +``` +**Description** +Negates the value of the byte and returns the new value. +`constexpr` and `noexcept` for C++11 and above. diff --git a/docs/binary/flags.md b/docs/binary/flags.md new file mode 100644 index 00000000..845bf1d5 --- /dev/null +++ b/docs/binary/flags.md @@ -0,0 +1,144 @@ +--- +title: "flags" +--- + +{{< callout type="info">}} + Header: `flags.h` + Since: `TBC` +{{< /callout >}} + +Provides a wrapper around a set of binary flags. +Supports compile time and runtime variants + +```cpp +template ::max> +class flags +``` +`T` must be an unsigned integral type. +`MASK` is used to exclude unused or undefined bits from operations of the flags. By default, all bits are included. + +Most member functions may be chained. +```cpp +bool isF5Set = flags.set(bitPattern, true).flip().test(F5); +``` + +## Constructor +```cpp +ETL_CONSTEXPR flags() ETL_NOEXCEPT +``` +**Description** +Constructs a flag set with all elements set to `0` (`false`). + +--- + +```cpp +ETL_CONSTEXPR flags(value_type pattern) ETL_NOEXCEPT +``` +**Description** +Constructs a flag set with elements set to pattern. + +--- + +```cpp +ETL_CONSTEXPR flags(const flags& pattern) ETL_NOEXCEPT +``` +**Description** +Constructs a flag set with elements set to pattern. + +## Modifiers + +```cpp +ETL_CONSTEXPR14 flags& operator=(flags other) ETL_NOEXCEPT +``` +**Description** +Assigns from another flags object. + +--- + +```cpp +ETL_CONSTEXPR14 flags& operator=(value_type pattern) ETL_NOEXCEPT +``` +**Description** +Assigns from a bit pattern. + +--- + +```cpp +template +ETL_CONSTEXPR14 flags& set() ETL_NOEXCEPT +``` + +--- + +```cpp +template +ETL_CONSTEXPR14 flags& set(bool value) ETL_NOEXCEPT +``` + +--- + +```cpp +template +ETL_CONSTEXPR14 flags& set() ETL_NOEXCEPT +``` + +--- + +```cpp +ETL_CONSTEXPR14 flags& set(value_type pattern) ETL_NOEXCEPT +``` + +--- + +```cpp +ETL_CONSTEXPR14 flags& set(value_type pattern, bool value) ETL_NOEXCEPT +``` + +--- + +```cpp +ETL_CONSTEXPR14 flags& clear() ETL_NOEXCEPT +``` +____________________________________________________________________________________________________ +template +ETL_CONSTEXPR14 flags& reset() ETL_NOEXCEPT +____________________________________________________________________________________________________ +ETL_CONSTEXPR14 flags& reset(value_type pattern) ETL_NOEXCEPT +____________________________________________________________________________________________________ +ETL_CONSTEXPR14 flags& flip() ETL_NOEXCEPT +____________________________________________________________________________________________________ +template +ETL_CONSTEXPR14 flags& flip() ETL_NOEXCEPT +____________________________________________________________________________________________________ +ETL_CONSTEXPR14 flags& flip(value_type pattern) ETL_NOEXCEPT +____________________________________________________________________________________________________ +Access + +template +ETL_CONSTEXPR bool test() const ETL_NOEXCEPT +Test the bits for the compile time pattern. +____________________________________________________________________________________________________ +ETL_CONSTEXPR bool test(value_type pattern) const ETL_NOEXCEPT +Test the bits for the run time pattern. +____________________________________________________________________________________________________ +ETL_CONSTEXPR value_type value() const ETL_NOEXCEPT +ETL_CONSTEXPR operator value_type() const ETL_NOEXCEPT +Returns the value of the flags as a value_type. +____________________________________________________________________________________________________ +Operations + +____________________________________________________________________________________________________ +Non-member functions + +template +void swap(flags& lhs, flags& rhs) +Swaps two flags. + +template +bool operator == (flags& lhs, flags& rhs) +Checks equality of two flags. + +template +bool operator != (flags& lhs, flags& rhs) +Checks inequality of two flags. + diff --git a/docs/blog/_index.md b/docs/blog/_index.md new file mode 100644 index 00000000..d7661667 --- /dev/null +++ b/docs/blog/_index.md @@ -0,0 +1,15 @@ +--- +title: "Blog" +weight: 3001 +--- + +## Graphics + +[Determining line-line intersections]({{% relref "./graphics/determining-line-line-intersections.md" %}}) +[Applications of dot and cross products]({{% relref "./graphics/applications-of-dot-and-cross-products.md" %}}) +[Scanning an arbitrarily rotated rectangular region]({{% relref "./graphics/scanning-an-arbitrarily-rotated-rectangular-region.md" %}}) + + +## Algorithms + +[Implementing a low cost moving average]({{% relref "implementing-a-low-cost-moving-average.md" %}}) diff --git a/docs/blog/graphics/Reflection1.png b/docs/blog/graphics/Reflection1.png new file mode 100644 index 0000000000000000000000000000000000000000..62e84a6664b9994e08570d5669bc61243d26c989 GIT binary patch literal 3825 zcma)82~<;88h#`YAS6hFAYn5+Fhv$k0tImy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I`+v z-GEPWNcwN3cCk+LYapw3!~uGU{RT2km{N`aEonPZ8Zd%TdwT-`{(vFtK>Ro88jRqS zUUbIsrp0f2bcC_E7>aAiTwMsFTO3PUcj#s)2Wju(Xq5|l&Y~1SU}9CypnlBW&{zb6 ziKWRy3pTNIFah7*O-9e2hKq^loZyi9fw47uc4C3R?|o|&Q%5DsqzCzj`dwl3#s335 CWO@1k literal 0 HcmV?d00001 diff --git a/docs/blog/graphics/_index.md b/docs/blog/graphics/_index.md new file mode 100644 index 00000000..5dfecb76 --- /dev/null +++ b/docs/blog/graphics/_index.md @@ -0,0 +1,5 @@ +--- +title: "Graphics" +weight: 1 +--- + diff --git a/docs/blog/graphics/applications-of-dot-and-cross-products.md b/docs/blog/graphics/applications-of-dot-and-cross-products.md new file mode 100644 index 00000000..16928bc9 --- /dev/null +++ b/docs/blog/graphics/applications-of-dot-and-cross-products.md @@ -0,0 +1,71 @@ +--- +title: "Applications of dot and cross products" +weight: 5 +--- + +**Author:** John Wellbelove +**Date:** 2019 + +## The problem +Sometimes in graphical applications there is a need to know the relative position of a point with respect to a line from a reference point. + +Where is the target in relation to the reference and its direction? +Dot and cross products can make this an easy task. + +Let's start with a reminder of what dot and cross products are. + +Take two vectors `x1,y1` and `x2,y2` +The dot product is `(x1 * x2) + (y1 * y2)` and the cross product is `(x1 * y2) - (x2 * y1)`. + +Remember that the dot product is a scalar based on `cos(θ)` and the cross product is a scalar based on `sin(θ)`. + +**Example** + +![DotCross1](images/DotCross1.png) + +We have a reference object at `Xr,Yr` facing in the direction of the arrow. + +The target is at point `Xt,Yt` + +![DotCross3](images/DotCross3.png) + +A arbitrary point on the line from the reference in the specified direction is `Xw,Yw` + +First, find the coordinates of the target and waypoint relative to the reference. + +`dXw = Xw - Xr` +`dYw = Yw - Yr` +`dXt = Xt - Xr` +`dYt = Yt - Yr` + +Now find the dot and cross products of these vectors. + +`Dot = (dXw * dXt) + (dYw * dYt)` +`Cross = (dXw * dYt) - (dXt * dYw)` + +The absolute values of the dot and cross products is unimportant, we just need the *sign*. + +`Dot > 0`, `Cross < 0` : The target is forward of the reference and to the right. +`Dot > 0`, `Cross > 0` : The target is forward of the reference and to the left. +`Dot < 0`, `Cross < 0` : The target is behind the reference and to the right. +`Dot < 0`, `Cross > 0` : The target is behind the reference and to the left. + +*forward*, *behind*, *left*, and *right* are relative to the reference's direction. +This calculation will be valid for any direction. + +## Other uses +This technique can also be used to determine if a point is within a closed convex hull. + +![DotCross4](images/DotCross4.png) + +A closed convex hull defined by the lines `L1`, `L2`, `L3`, `L4`, and `L5`. +Point `P1` is inside the hull, point `P2` is outside. +For `P1`, the cross product for all of the lines will indicate that it is to the *right* and therefore, *must* be inside. +For `P2`, the cross product for `L1` will put it on the *left* hand side and therefore it *cannot* be inside the hull. + +**Why does this work?** +The dot product of vectors `A` and `B` is `|A||B|cos(Ø)` +The cross product of vectors `A` and `B` is `|A||B|sin(Ø)` +Where `Ø` is the angle between the vectors `A` and `B`. Range `+-180°` + +Therefore the sign of the result indicates the quadrant that target occupies in the circle around the reference, relative to the reference's direction. diff --git a/docs/blog/graphics/determining-line-line-intersections.md b/docs/blog/graphics/determining-line-line-intersections.md new file mode 100644 index 00000000..279103ae --- /dev/null +++ b/docs/blog/graphics/determining-line-line-intersections.md @@ -0,0 +1,115 @@ +--- +title: "Determining line-line intersections" +weight: 2 +--- + +**Author:** John Wellbelove +**Date:** 2019 + +It's quite common in graphics and image processing to want to know the intersection coordinates of two lines. + +The common formula for a line is the familiar `y = Mx + C`. + +But there is another that can be a lot easier to use when determining line to line intersections in a graphical environment. + +## The issues + +When using `y = Mx + C` you must be aware of the situations of when the line approaches 'vertical'. +In this case `M` tends towards infinity, which is not good in a programming environment. + +The usual trick is to flip the coordinates when the slope is more than 1, and then flip back after the calculations have been made. +This can be confusing to follow and result in errors. + +Also, to keep any accuracy, the calculations must normally be kept in the floating point domain, which is not ideal for performance, as the image will be in integral pixel coordinates. + +## The solution + +Change the definition of your lines to use the formula `Ax + By = C`. + +Ideally, your lines would already be in the form `Ax + By = C`, but this is not normally the case, but we *can* easily generate the parameters from two points. +Assume we have a line defined by `(x1, y1)` and `(x2, y2)`. + +We can deduce `A`, `B`, and `C` thus: + +`A = y2 - y1` +`B = x1 - x2` +`C = Ax1`+ `By1` + +--- + +Another useful calculation is the *determinant*. +Given two lines `A1x + B1y = C1` and `A2x + B2y = C2`: + +`determinant = A1 * B2 - A2 * B1` + +If `determinant` is zero, then the lines are parallel. + +### Notes + +- If `A` and `B` are both non-zero. + The equation represents a diagonal line. + +- If `A == 0`, `B != 0`. + The line is the parallel to the x-axis. + +- If `A != 0`, `B == 0`. + The line is the parallel to the y-axis. + +- If `C == 0` + The line passes through the origin. + +## Calculating the intersection + +The intersection point is calculated like this: + +Given two lines described by the points `(x1, y1)`, `(x2, y2)`, and `(x3, y3)`, `(x4, y4)`. + +![LineCross1](images/LineCross1.png) + +- Calculate the parameters `A`, `B`, and `C` for each. + `A1x + B1y = C1` and `A2x + B2y = C2` + +- Calculate the determinant. + `determinant = A1 * B2 - A2 * B1` + +- If `determinant == 0` then the lines are parallel, and there is no intersection point. + +- Otherwise + `x = (B2 * C1 - B1 * C2) / determinant` + `y = (A1 * C2 - A2 * C1) / determinant` + +## They don't need to physically intersect + +The intersection point can be found even if the line segments aren't actually long enough to intersect. +The calculation will effectively extend them to where they *would* intersect, if long enough. + +This means you can find intersection points relative to a fixed reference line. + +![LineCross2](images/LineCross2.png) + +## Refection + +This describes reflecting a point across a reference line. +It uses the intersection method described above. + +In the example below, we want to reflect `P` in the line `Reference`, to give us `P'`. + +![Reflection1](images/Reflection1.png) + +First, we need the reference line in the form `Ax + By = C`. + +Next, we need to find the perpendicular from `Reference` through `P`. +Any line perpendicular to `Ax + By = C` takes the form `−Bx + Ay = D`. +To find `D`, just substitute the `x,y` coordinates from `P`. + +Now we have the two lines in the form we require to find the intersection. + +Find `I`, which is the intersection of the reference line and the perpendicular to `P`. + +Compute `P'` by using the formula `P' = I + (I - P)`. +This calculates the vector from `P` to `I` and then adds it to `I` to move the same amount again. + +## Line to point distance + +The above technique can be used to find the distance of a point to a reference line. +This distance is merely the absolute length of the vector `I - P`. diff --git a/docs/blog/graphics/dot-and-cross-products.md b/docs/blog/graphics/dot-and-cross-products.md new file mode 100644 index 00000000..e4526c19 --- /dev/null +++ b/docs/blog/graphics/dot-and-cross-products.md @@ -0,0 +1,26 @@ +--- +title: "Dot and cross products" +weight: 4 +--- + +**Author:** John Wellbelove +**Date:** 2019 + +## Dot Product +The dot product of two vectors is the sum of the products of the corresponding elements. +The dot product of vectors `(x1, y1)` and `(x2, y2)` is `x1 * x2 + y1 * y2`. +If `A` & `B` are vectors, the dot product is `|A||B|cos(θ)`, where `θ` is the angle between the `A` and `B`. + +`|A|` is the length of the vector `A`. +`|B|` is the length of the vector `B`. + +Therefore, we can calculate `cos(θ) = (A ⋅ B)/(|A||B|)`. +A dot product of `0` indicates two perpendicular lines, and the dot product is greatest when the lines are parallel. + +## Cross Product + +The cross product of vectors `(x1, y1)` and `(x2, y2)` is `x1 * y2 - y1 * x2` +If `A` & `B` are vectors, the cross product is `|A||B|sin(θ)`. +`|θ|` is the angle between the two vectors, but `θ` can be positive or negative. + +Therefore, we can calculate `sin(θ) = (A x B)/(|A||B|)`. \ No newline at end of file diff --git a/docs/blog/graphics/images/DotCross1.png b/docs/blog/graphics/images/DotCross1.png new file mode 100644 index 0000000000000000000000000000000000000000..32c9de03d76cf68b06117e48e0d95ba424fd40d6 GIT binary patch literal 4453 zcmaJ_c|26__qUH_j5Q36C5cqBBr()X##Ujni_uskb{Fm*uorR z1L6R9(fPT+yLheIcMu>~Ei6qSU-(3!!m@3*6sAFuK#;j}CZRi@CkJ1+-^=&A(@rThlWtlKOUN#-LXAD`Eygv z!-O&v!+A`t@IYETGfh~i(+4 zfrg^3rr^efB2LoUhoUJ}3HCQ&tWM`ghu+GS*EHfg#ng9IkD57C#nFJMU@?iG7mG~f zsz99OWWXMB5K^!lRAaSRrjn%Q!-)sG(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 literal 0 HcmV?d00001 diff --git a/docs/blog/graphics/images/DotCrossCoordinates.png b/docs/blog/graphics/images/DotCrossCoordinates.png new file mode 100644 index 0000000000000000000000000000000000000000..8fc43021230cce5ff924b795abb3a9a0c0dd0e46 GIT binary patch literal 2346 zcmeHJdo-JA8c(9#`=KtwehRj6-9Nw>ZuSZbJDpVjK(x;6M}Pd-;6Qv&?g$(@ za>Fkw1%WW=`Na+hi4E7_;Gyf@f!+uNi>|*LcNl@t?es@^how(1Pf@`)kf~68HhHhs z3x!Go{(?C&kgByfgf4PFQ_;p9SW+|$6AmnlCZ!?+oH>HPyf34Um*KCzO0qG}ja)G5 zeb#(w-OwVQ>D_wv@9f%5lkea7yZ8XFHm0+c$$8+9sV;@<%AA76UDacn?%NJTlvdjCF zlgjuYF9s-XE_FikEp6bK?^<<5u{k%KRXYly4%2|p0;&l~Ju}6OK2CPnVKjXv#@ob9 z@K*H1%}5Pn!!sg|DG1|h*N9Sy!r~m=V4pk*frs+}mF@1$j`W!xs9pKhY@#MBDB@dC z&8MjAahOk;(QDn?VN1p3sss8*k(lJqzj&9!!_f#`8R|f}6JUa^oIXJ%TcGm^;oTj5 zP*Lt3puT-`F70V_YT{=eO7dWi4=pr>)5S(^Qbnp?k7VdO5;b$_I&Z(jvXj3)bB09V zYbPeMMFN1ue((C`t|ERp^$#c zi%;3hoV!~jKR#0B&PkeT4Yq<6HLuA`DFmEgde6CBw}@*lC%@XH-j&;rkB{45kViaB zWS3h*IWCEBpLvou^ELGetfr>Ll95hHoT5Ujr9kDkS-grLRJ0*$>|j`E=vZTTlazO5 z8izar(~^DJ)Y$0e<|a*iN_I_aY2ddwlR!rcXQIr`+PVOBdPVr09BG?(ZL^3#Ajmpy z#w*t5hbo|znMKXLlsv$xHLmAQX=&-mdFo}Jl>?4nxq0_vY%1{)d@H5P()s!bW7%v9 z?#+d-(`l+J*$d-iEfkjzHLWRRGLKB*)`R%5y}{;&hVshFfb6i3kPNtnp9hLbl-Vz? z54XH~AjPYKiQ?%zY3Ad3F)YjM#Z$yO+5YNJJ*1h(24)_U5=q65mDVu$TygXgS5^W# zcG}zy<4UfjdOQ@o5W%WY#n3(Xwua@|`+XYc)>{BJOpGsVn-}5|x<%(dt*9K10z=TW zgo)7TizYY;^wN;fCTQnKZtrexKlqWqB|WWj+QQ=Y1}5$UpDeoTkS5!8S7-@knv$-x zeUAJDMfI;?ADRs|fW=>J9>uk3cWR?g1uodJ8<+y?2xVQH>5M5W2tVefk8A|h!yE7~ zrCl}jdasGV0V6)NM!3QeFY>)V+3(59=-N5uB(<-V0+Ss28JMl^i=l1=I;7%M?e6gN zuW!*hz2Q`B-{0Z?)q_SOq>P_U7BkTY4;~yKa(TQm2b>vAkQG!F1csFC@FyoHBcr1$ zq|X`~ze!Hs@Vv#SL5IHwYQ;)vX9_I%_vfqK(!O~&TBlBzLj4(cfbazQar#Nu%b}sO zjDOF~%~e%Z@fU`?*bNsYir!vSR8&+|BHRnI2S*KS3 literal 0 HcmV?d00001 diff --git a/docs/blog/graphics/images/LineCross1.png b/docs/blog/graphics/images/LineCross1.png new file mode 100644 index 0000000000000000000000000000000000000000..20047e570b9104fb16fa8037174aa660d7654650 GIT binary patch literal 7179 zcmX9@cRbZ^8zy`2y&@|_PGuFsk&&{q3USEF-VU-iIp#47aZpA`X7=7Qn=+2Q*CF1= z@BPF0e8)5H=f1D|x~^}8#!DqKVrF72EG#k=WvCVw7Pc7pznAb9_-*@zKL-3Ea#S{O z!NMYMz4^iJbU?wduvi*YpmI8%8QXJ2`r3Na1ba9TWl_^2A*ui_9Azpwi@O>bxO0u@H>O(&0?CmW!3S(ek z*qv{Z1WNSF13e~v zb{oWDU6iPp4Dzzu65J9Jo*;~6vtwh4Sy|*k`a8z_!+U~QTEuRt8c$i|sh#)#D4r1o z=T+5-OGz=`njJ15%$C*D({r%1d*X`z7#0?0io+NpuT=fwa(mzw+v z9aoBDw|Mu?C2f3s{2YTB$dIh~Z!y$+|4tV`*1VtnNtMhXq<`NPt%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kxz>q{2}1qCjfn>D#g zHO$35dv9l#e9vh0@81fG-egd)f&y1m0l>l`XA!dlm7kd<_VD3RQvgoJ3ZQiNjO$Y? zu>9q_A|xs~p_+1Xa!E-^fiouco}Y7azPqk#4Q!PDx*}dF2cFvoo3{37UteEnXsG+( z`D#B4Fpnhi>g!qkNSb~h19L+|d3Ua^Q*w5ASd@nc57Y3TD+lYEDi}qGsRWS^ta1WA z@@~VaF|c=SYy@a^t$w_p5!;yuU=}_LB!QRs!F1W%R^a|rR#lOZkeHjBFFjdWTAFR3 zbOQxPK|#SdK^MFkZqS$bAIe(52A@u?r1CX;+zx)rdl>q{QPY-|# zkr5HCqaFDXKBqh5Lqm%*CB?ba12#@L8o1RumbSJRy&}IH z^*9}70p^ONe&FO;-~=BkLbuC6^Qd!PQEhesA5k)8{r#>k&$s;)C1ew=xTL^ITMQ+I zP?-E*nFX2LbiVPl%8-YYPY0+)w2_ z7;Fk-W69(3fNes1v|YX6o~VAX!}}eqlIu=cBp31b%1YX+T6>^C84IZmZpu8bun@R7 zg7q<9FPF`g7&JBNDo#9|Rw=r10SJD2Dcj)c=y?0TiTEEr)bR`g8BWC%0A5^PU8QGb zogJPBn&%ww>6?pVv}|k*ppXV~BRs)gzvSgnP6g<>QY8UGFLL+pI{1QAcDWSB0Z3;w g(}U11O8F~_5T~3KjdAn@__~LsqWBV8B5xY_KQj*w4FCWD literal 0 HcmV?d00001 diff --git a/docs/blog/graphics/images/LineCross2.png b/docs/blog/graphics/images/LineCross2.png new file mode 100644 index 0000000000000000000000000000000000000000..a799713e23600c3ebd69dc003a0882d253063ebd GIT binary patch literal 6416 zcmai3Wn5HExTix}lr9MYeF^Cf>0Sj1DV5HpV}S((2@w!bkOmQ1Wocvy7f=wSYguA( z>Dr|P7HRJBeSi1U{cu0**)uc$^VIz3ndi(&2AS&7UE{b$L_|bqps)Rqh=|w_xF4V* z0j`OoCi%c0Wsrf14&^chBi$|fh4=krKo_;2zD*zz5q;O+A8{`j<_vU_xo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phics/images/Reflection1.png b/docs/blog/graphics/images/Reflection1.png new file mode 100644 index 0000000000000000000000000000000000000000..3663702261690d1629335b9dc366fe217a7d9d0c GIT binary patch literal 3841 zcmZ8j3s@7!79J7^5Cf6`Y5+AvhzJ3bfCy?WNdOZ;AiN}ikOZNn7h4|Q7Hg{{0g-o* zE57iP0wNT&h)|`qHEak(!1Ac{1BzUH(9#Qj>aCC3YWHpk*@U~_?C#7zXU;kMpL1rm zC?af^72W|40I=fo0wa-k26C5LV3FsQH#a{A01F~Qqk~`=Mvz8SAGD1Q^;^X7T#>UpHS<~6s`Th6bySuxSNF=#jURqkpWHPI&stzAM zOrcP&T)CoFt8;R4EG;b?8X9V9Y9b>eQ&Lj4ZQJ(p)!$Peen{?hnEv!roaNiMFJC_H z?Cc>Du}ZU)RQToFR}>AE=>uz=otcB)D@m|=_3FPC7W}sV9T^RuIt|}^^4+iJ&-ZWI z6fne@`Q!erTLXjM-ksNBeh7U0LDBH@k%hk=|F^$?X!yyOEx*sVw6x4$zA#ri_vdf4 z+isnYufG@@`=Snp5VxQeD^)~EV~U3-Jj&Uos4lQf4y)Agg<5!I*RJQo z!&6yVo&#Q6?riNJgr7cx?N-BfJ*z&N%DnhnBgX8{ZZor2_wH@q33q)1-|_V=d06^M zF8pJ7c+;2gQK^&eRqVFueG0R2(==`Ku-5tXKMf*MEDO&7jMxI9c z5sUrdMVw*1D059KQ>*J&m?3?JPNqwXGtBytXQqwzsaTY;>CobNARqvU@_+)E*w~ol zDS=Ygo`N<7P#`S=L?CS#49|d>#ipEDlBul)uucYfJ_UKYet=eCKrN_k18s{<*#;0v zq$%2f!h%87mV{*{PnZLMwMu)N^nKK{AAl8?_<`)`_oWh%NTi6hJMqZwJu_yy1yTfB zVqh4-6=G8?f9K?658~t^Ci_{faT^SdI&6@dkx!^KO}wZQ6yoHTRtl;cM|$fk0TA zg+@Edwitwa@jfpcuvjgLFwE(7n(FX5ulIq|eY2x=#PHqSpLIMp$f}DIP3_uFtiNo~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ScanRectangle1.png b/docs/blog/graphics/images/ScanRectangle1.png new file mode 100644 index 0000000000000000000000000000000000000000..9d9a30fb820cd48f9340ef0ec6e983856c1bd753 GIT binary patch literal 5075 zcmbtYc{tSH+x`$KmCVZ zO|}MOBzu@NjAbnEQNQ1Hz3=a@_r2afFwUIwoaa2}exCb&&ciE)x`#LgI3Wl+q<0B* z6@pl;!RL;Btl+mq^xPxxhr?IT0L?MSF0}usvi(n5EEwAFb;-g9g18!Ye^^>Pa~;7T zo67}*3lLQN_`v3Mb_n9J*F#+}2^dMY7_1WvP-kGSF1(Fu`Wsmh^#6{TzueFCI8|PdBR|N z?#ZiOMZKJa&%UYRzAB5o!#1#s^FrBlQg<)a$j{*Y!Ev6Jwo2*~DqWDS1VL-z4vxaW zyHXK61l@z7A?O1R0YTSMFepNfun*GW$FM;nu}D^kTL;bp?GyXIPs@B8$F=i8=!e7O z@D=~?9nIb^QkVZ$FEL`veS~Dqvm|9R;=Elx#%>M#sNDIPM5T%`T_f^vh|Fx|=hs4S ze`N;Ee3Ny`;JU(#Ve6wiWie~<{6S7mgRL53nI{PQa;M{UW5jfq(u2D{{d;6oI4wp9 zz2xRmC(2BT2m-d!YiY`=c5vxrLvjmS-$gh}GaIYAW{v0AspdGYhWP~6IZ=Fs0BLkl zOxMO|`dZ7W#H~qNULBe7ElmwsCMn`64q@lk*=aLep?bCV^!Ujzkub^a_L>@Z2U^Et z?&fn;x2K_AT6!p$oLJ0jdXkyoUkS0X9eEd{t(qO|Gi-k{R2f#MRxc8lykD0*KAek3 zvO0fTU7eWrKiyF*enLRX6nh%!#lafC_(nP4?MgItyRq5Ze^S=MQi}Nw+mN{u!Dfnak+$`7cA24$aSBx0KAw;4(@2LCdhmL3e zx-rWu96B<8o3d!0b=?;~{Wn>dFY_#6Uu+(MkS|Lz7tXknoMhwk%f!me%#JObzU1vx zqN$R_63bwN!hut^OrNKItM}&E)b~Gogr+jql#V&~|I!ZuW3kxpZNI@RI5`O`IIE1lxR1C_p|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(_c>YbUqG6Iu6wn38xv5@?G~j%v4DCR^zjFeF^!3kx`{6n^HK!zE z%8jO!l~Vx00J2D&_|Fc5rBu3sHrh+K>2v2+ao&6O-w zM=^aoX2T<=fkN4i6zKWz3|k~CGbJyu%k1e>jwUwsLO&Y!WT6>G`iEpn!kNcvDP4a# zL!br+scdsRo4Gr0+={VTpj3TIPQ0n6l;cJX%V}v;WRG}{zz6*bsy$^8mzCBC*8jIw z1)Lpf)Pk4u9#D-&GcU%>H*?h93Ke^nwWrDeg|YIS9HMXc0aCzx^YZl=UYxOUr1_pP zV6k)LMtk%RGH>%)IAz$MNJbgw>v9S%^eTh`2x)ZSgm++MVy?&&kECw*Me!s zU*se2;SWV&T*AVQu9mQ>Mjtpp$u|YM7BoI@TaQPeP#7QMoNFmQL6qqO*t+C+izEO{ zi{UGlbMXNEBKVr&>iqSwEK_pM+JoMspn*}64pOzpuJolDVcr&?G0c& zC7Y{!XXN!3?*z2019$jPKu(gD7Gs2_6GBcIl{-0s<2L-X55>Shy0}InKi+H9we(+f ztM8;XP1Y>+v~+^k32{ToZi-ta8H7^n97dM z$Bph(SIU{20_51%Ry0eGsT*AcZv~(^tNY~^)%-<*xdzGQ;Rsz^!nd}H5D&0{feYi$ z{7_0fmVoi&ay1u9OqQBb>j$7v?&g#$ zwzOb3!+y`>65E}xn!(e`xw9L9CZG=7|K~~RfAv7MefUnD`AaX3#3}H;1?iy;QAOHz Gk^co7E0^d1 literal 0 HcmV?d00001 diff --git a/docs/blog/graphics/images/ScanRectangle2.png b/docs/blog/graphics/images/ScanRectangle2.png new file mode 100644 index 0000000000000000000000000000000000000000..ba629fba60b38d1d54d8ee3885d485439818b34d GIT binary patch literal 3611 zcmZuzXE+;N8%}LP@wT;IrKwT7wQ6haq=-#Rs*0j!5F=u=Mq90*W^2}{y+u(oRuQVG zq?AbQnV3bbFa5s1-?^@Ho^$SVKkNK>&J$}2HDF`mV*vmFY!I-nIRHQdqwa^8XsPR4 zHS`KqFd`tvdW>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?Xp(ATknh3E5AT z!~c^F8NX&|lpz`A7007+0OQTt{+*#Ncp@~y*CHb?SUePD&`TObuNq~w+R<>C!=4Pg zkRRAiQG1YE5Hs1P$6wuou3o+A3pSHItbHN_<^65ICCeKko@*Ov7!NHJb_VOil0DA+ zk-}k*WO;=v|xnRCTFB-`X zYgU(h_rO1$3;hb8O_4%rhh9YKnwz0FOQyqI7bFaFO+yTluu@3f$W}Xt@xQ-w8t4GU zd+1IlmTRTM>-;OMTj`@IwZqwtSX%JgHt2N-mgg}#+?$%0yL5-wH$n$e442yz!b&m_ z^4$@`r|!?*#5K+PzO}TSOmqn!#(}>d*Ev#aRcuz&$f;!~c_^wdDIWMkrsk;yhO_x^ z>#^%i7pz_KT1yp^%yIk=?FNS^uhz>za$crLY6S<95}=CdZs8;;o?VIZbYoOu6yMgk zsX0WS%KswJIdzFJ!mMsCixFzLT>KiVXs99%mKe%&yp?rNvitx^QIR6*B>-l$RaO^k z|Mb#(OXXVX@JuzU({NkKg8eT#7EX}5U|_lHp=u?<-rGd0CbtA`&8)_{vO(7(-XT9lZ@AR-yL>UKBiL~mdh=)t>D7)+~V}dM5$D3te^SeHSQ}> z@5Jf8E@2!wsGKAIH~_VrnL=5Xr)rQVv0?G=wH=_(E70uA$r4n}qv6cBSI*ijF9JK$ zzNweeSwmmvU9EX~G=0OgV!HR+MP)x|FG+O}f^BBEVbz}lU6GG@25erm;I8*GXWe`z zDQTmVmwctPo^j+t6US+^rVZHw$Kxa#!bs&YeqR-mMK_av7=ij#o^eZ=?6Nr&acq5O zlW+2#tGc>nKC}~eyx#gRtsnFKNRQYcr@Jze%6`}`n0(Z_LF-SNq}U8>!$!Clz*^A6 z$?%)&!t(^ZD!$q)b2A)?X4ei!Q#s6w|6i|8#je$y(;9Uuex}ubg7^q{&`+76Nb E0h99l{{R30 literal 0 HcmV?d00001 diff --git a/docs/blog/graphics/images/ScanRectangle3.png b/docs/blog/graphics/images/ScanRectangle3.png new file mode 100644 index 0000000000000000000000000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cr4_{R$fes+YCuJ#jzocOWU}fBNYLuABBFp`$|E@w_uW>ahH`@+H-?`=uRKlFZUx>^#*_!msS&foVR|V zCuq6YWClNRaAg3TD1ZPbn%n&d%4s~dx9$1rt-GHk1vAVaxuEvO`>2C~mPn(|fiRe< zb(2o`{ZC`3I}&tU)7|fZs>T8uyt|B%*8S&$Aak0qB1?Fb8>-x%Eit<6@N>mtxn!lu zSclNTzXCzcL*LxdwCjY`7BS;|5Jzha_HAiE0FhO-G)y+UH@~y(NRIF=74)G`Qr);G zQ&pI^bFHxj9?U)-i8LyO-)|fIUgR{PYUKCuc_&h!y7X7W#)!5MDIYYC5?CSB;K_ZM z>SL!1{vE$KrWR88A+2|s`;i*Tv=L=dJtRKHA;1sO1h(1b~0s% z6|F}H@d7bR8MCg=>t5k2H$Es^e=T40ix1+@3c~HBHyw8Lt6+2Ss6NN4yj+ms>v#|X nB@8*~mp~v~|G$USW4fW}C|q_JR~h(!266|kr&)IEpQrx?B=Huj literal 0 HcmV?d00001 diff --git a/docs/blog/graphics/images/ScanRectangle4.png b/docs/blog/graphics/images/ScanRectangle4.png new file mode 100644 index 0000000000000000000000000000000000000000..d39a7e3809faa22486cb13b710abeb35eb7778f8 GIT binary patch literal 9500 zcmb7qWk6J2*Y?mLjYx+e-616EFu=FH zpXdF)_wV;(&cK;-_Fj9Pwb#0?Yn>H#z|>hN#zAEDAV<^;W^a0|LSO{`Z5_@A}yaoJ6&iQk8;0YU8mH=4cQI zL%HHBDQ%yHgP*>}TDI-zZ}Xaphb!MWra68a_1P27j^JJy!Px9Eew;DDpKGy z>_Hol9}Fq3A2s_8)lB53wU{>_Sj~F&v3R zZrzFmhxsT3`9}Gk=6Eb$H98)kk6U5Xei>|DU5{Kww~_A?E=b1d?|} z5M6g=yiH^Rfi8_L1|Z=_l3Sb2GQ zg@x0-pFkkv%9yf(_RljJl|PPG0iXI|$ZL>y!Om#p!4AwF| zGgD~-`}o)9V*-L`o9Di#Rtt$x56lIF9;$+ z19df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B8EzJP(VHaE?r9UK7qz$BUjTB2+78DO+`!An_wgo@RR}*pABDGjmm#Dt zZkpMr+A+10qKqTcS-PzVKl~J{>*bc1?=$UB1BUy3OnHDK^ai1#I)q1p$5<537>S5D zqV}VHYHCZ?6iwJlYohxwz%*BM>t-x67aNzP52Ffe;NZ z#g3iiLhdOW@Y;Ev8c1>RA2Ctl=!v6P{KHWpim68X;U|KMx6{NFsYg_xL`>Pzr6$*Y+F}89 zH89xDd$NVrW0R-+FnU18$)Q4DoR{bMI6@&D$rSU!98gNo6XU7duVW6X>iCErZ4#6E zPr=##Q*fcZkvoZ0D7S_CK&}} + Header: `callback_service.h` +{{< /callout >}} + +This template class allows easier integration of 'C' style events (such as interrupt vectors) and C++ handlers. +It can allow abstraction between low level events such as interrupts and their application dependent handlers. +The handlers may be any combination of global, static or member functions. +It utilises the templated function wrapper. + +The callbacks are identified by an id. The values of the ids must range from zero or a specified offset, up to the maximum number of specified callbacks. Calling an unused callback id will either do nothing or, if the user has specified a handler, call this with the id of the callback. + +There are functions that use both runtime and compile time checks of the callback id. +Compile time is preferable. + +## Member functions + +```cpp +template +etl::callback_service +``` +`RANGE` The id range of the callbacks. +`OFFSET` The starting id for the range. + +It can allow abstraction between low level events such as interrupts and their application dependent handlers. + +```cpp +callback_service() +``` +Sets all of the callbacks to route to the unhandled callback. +Sets the unhandled callback to default (do nothing). + +--- + +```cpp +template +void register_callback(etl::ifunction& callback) +``` +Registers callback with the id specified in the template parameter. +A compile time error will occur if the id is out of range. + +--- + +```cpp +void register_callback(size_t id, etl::ifunction& callback) +``` +Registers callback with the id specified in the template parameter. +The registration will be ignored if the id is out of range. + +--- + +```cpp +void register_unhandled_callback(etl::ifunction& callback) +``` +Registers the callback to be used for unhandled ids. + +--- + +```cpp +template +void callback() +``` +Calls the callback associated with the id. +Calls the unhandled callback if the id has not been registered. +A compile time error will occur if the id is out of range. + +--- + +```cpp +void callback(const size_t id) +``` +Calls the callback associated with the id. +Calls the unhandled callback if the id has not been registered or if is out of range. + +## Example + +See the example project in `examples\FunctionInterruptSimulation`. diff --git a/docs/callbacks/closure.md b/docs/callbacks/closure.md new file mode 100644 index 00000000..e79626cc --- /dev/null +++ b/docs/callbacks/closure.md @@ -0,0 +1,75 @@ +--- +title: "closure" +--- + +`etl::closure` wraps an `etl::delegate` and a set of arguments. + +**C++11 and above** +```cpp +etl::closure +``` + +**C++03.** +```cpp +etl::delegate +etl::delegate +etl::delegate +etl::delegate +etl::delegate +``` + +## Types + +`delegate_type` The delegate type `etl::delegate` + +## Constructor + +C++11 and above. +```cpp +ETL_CONSTEXPR14 closure(const delegate_type& f, const TArgs... args) +``` + +C++03. +```cpp +closure(const delegate_type& f, const TArg0 arg0) +closure(const delegate_type& f, const TArg0 arg0, const TArg1 arg1) +closure(const delegate_type& f, const TArg0 arg0, const TArg1 arg1, const TArg2 arg2) +closure(const delegate_type& f, const TArg0 arg0, const TArg1 arg1, const TArg2 arg2, + const TArg3 arg3) +closure(const delegate_type& f, const TArg0 arg0, const TArg1 arg1, const TArg2 arg2, + const TArg3 arg3, const TArg4 arg4) +``` + +## Operations +```cpp +template +void bind(UArg arg) +``` +**Description** +Bind a new value to the argument at the specified index. +`UArg` must be one of `TArgs`. +Only non-reference types can be rebound. +Static asserts if `UArg` is not convertible to the closure's argument. +Static asserts if `UArg` is a reference type. +*C++11 and above.* + +--- + +```cpp +template +void bind(UArgs&&... args) +``` +**Description** +Bind new values to all of the arguments at once. +The number of arguments must match the delegate. +Static asserts if the number of arguments don't match the delegate. +*C++11 and above.* + +--- + +```cpp +ETL_CONSTEXPR14 TReturn operator()(TParams... args) const +``` +**Description** +Invokes the stored delegate with the bound arguments. + diff --git a/docs/callbacks/delegate-service.md b/docs/callbacks/delegate-service.md new file mode 100644 index 00000000..c7498744 --- /dev/null +++ b/docs/callbacks/delegate-service.md @@ -0,0 +1,93 @@ +--- +title: "delegate_service" +--- + +{{< callout type="info">}} + Header: `delegate_service.h` +{{< /callout >}} + +Delegate Service +This template class allows easier integration of 'C' style events (such as interrupt vectors) and C++ handlers. +It can allow abstraction between low level events such as interrupts and their application dependent handlers. +The handlers may be any combination of global, static, member functions, lambdas and functors. +It utilises the templated function wrapper. + +The delegate callbacks are identified by an id. The values of the ids must range from zero or a specified offset, up to the maximum range of specified delegates. Calling an unused delegate id will either do nothing or, if the user has specified a handler, call this with the id of the delegate. + +There are functions that use both runtime and compile time checks of the delegate id. +Compile time is preferable. + +--- + +```cpp +template * Delegates = nullptr> +delegate_service +``` +`Range` +The id range of the delegates (last - first + 1). + +`Offset` +The starting id for the range. Default `0`. + +`Delegates` +An optional pointer to an array of delegate pointers. + +If the pointer to a delegate array is supplied as a template parameter then the delegate service may be declared `constexpr`, otherwise the service is runtime only. + +## Member functions + +```cpp +delegate_service() +``` +Runtime only. +Sets all of the delegates to route to the unhandled delegate. +Sets the unhandled delegate to default (do nothing). + +--- + +```cpp +template +void register_delegate(etl::delegate& callback) +``` +Runtime only. +Registers delegate with the id specified in the template parameter. +A compile time error will occur if the id is out of range. + +--- + +```cpp +void register_delegate(size_t id, etl::delegate& callback) +``` +Runtime only. +Registers delegate with the id specified in the template parameter. +The registration will be ignored if the id is out of range. + +--- + +```cpp +void register_unhandled_delegate(etl::delegate& callback) +``` +Runtime only. +Registers the delegate to be used for unhandled ids. + +--- + +```cpp +template +void call() +``` +Calls the delegate associated with the id. +Calls the unhandled delegate if the id has not been registered. +A compile time error will occur if the id is out of range. + +--- + +```cpp +void call(const size_t id) +``` +Calls the delegate associated with the id. +Calls the unhandled delegate if the id has not been registered or if is out of range. + +## Example + +See the example project in `examples\FunctionInterruptSimulation-Delegates`. diff --git a/docs/callbacks/delegate-vs-inplace_function.md b/docs/callbacks/delegate-vs-inplace_function.md new file mode 100644 index 00000000..92994db7 --- /dev/null +++ b/docs/callbacks/delegate-vs-inplace_function.md @@ -0,0 +1,220 @@ +--- +title: "delegate vs inplace_function" +weight: 1 +--- + +## Efficiency and performance +### Invocation cost + +**delegate** +One indirect call via stub function pointer; no allocation; forwards args directly; minimal overhead. + +**inplace_function** +One indirect call via vtable invoke pointer; no allocation; overhead effectively the same as `delegate`. + +### Copy / move cost + +**delegate** +Trivial copy/move (object pointer + stub pointer). + +**inplace_function** +Copies/moves the stored callable in an inline buffer; cost depends on callable traits; may run destructor on clear/reset. + +### Size / footprint + +**delegate** +Typically two pointers; very small, stable footprint. + +**inplace_function** +Buffer + vtable pointer + object pointer; size depends on `Object_Size`/`Object_Alignment`. + +### Ownership / lifetime + +**delegate** +Non-owning for functors/lambdas; stores pointer to external callable; caller must ensure lifetime. + +**inplace_function** +Owning; stores a copy/move of the callable inline (RAII). + +### When to prefer + +**delegate** +Minimal footprint, cheapest copies, free/member function binding, controlled lifetimes. + +**inplace_function** +Value semantics, safe storage of lambdas with captures, uniform SBO wrapper. + +## External API differences + +### Template shape and size + +`delegate` +`inplace_function` + +### Construction / binding + +**delegate** +`create()` +`create(T& obj, Method)` and `create(const T& obj, ConstMethod)` at run time +`create()` +Construct from functor/lambda by reference (non-owning); rvalues deleted to avoid dangling +`set()` mirrors `create()` for re-binding + +**inplace_function** +Constructor from function pointer +Constructor from object + (const/non-const) member function (run time) +Constructor from functor/lambda by (const) reference; callable stored inline (owning) +`set()` mirrors constructors; also `set()` and `set()` (compile time) +`create()`, `create()` (compile time) +`make_inplace_function` helpers: `make_inplace_function(free_fn)`, `make_inplace_function(obj, &T::Method)` , `make_inplace_function(lambda)`. + +### Equality and swap + +**delegate** +`operator==`/`!=` compare stub and object; structural equality. + +**inplace_function** +`operator==`/`!=` with `nullptr`; `swap()` provided; no general equality between two functions. + +### Introspection helpers +**delegate** +`delegate_tag` +`is_delegate`. + +**inplace_function** +`is_inplace_function`. + +### Call helpers +`is_valid()` +`explicit bool` +`call_if(...)` +`call_or(alternative, ...)` +`call_or(...)`. + +### Functor storage semantics +**delegate** +Non-owning pointer to external functor/lambda. + +**inplace_function** +Owns a copy/move in fixed buffer. + +### Size control +**delegate** +Fixed small size (two pointers). + +**inplace_function** +User-controlled via `Object_Size`/`Object_Alignment`; aliases `inplace_function_for` and `inplace_function_for_any` to compute required size/alignment. + +### C++ language features +Classic non-type template parameter APIs; C++17 "auto" `make_*` helpers exist when enabled. + +## Performance differences: + +### Call overhead +**delegate** +One indirect call through a stub function pointer; minimal overhead. + +**inplace_function** +One indirect call via `vtable->invoke(object, ...);` typically one extra pointer load; practically similar. + +### Copy / move and lifetime +**delegate** +Trivial POD-like copy/move (object pointer + stub); no construction/destruction of target. + +**inplace_function** +Copies/moves/destroys the stored callable in the inline buffer; cost depends on callable traits. + +### Construction / binding cost +**delegate** +Binding free/member functions sets two pointers; binding a functor stores its address (non-owning). + +**inplace_function** +Constructs a copy/move of the callable into the SBO buffer; more work up front. + +### Memory footprint and cache locality +**delegate** +~2 pointers regardless of target; high container density and good cache locality. + +**inplace_function** +Buffer + vtable pointer + object pointer; larger, size depends on Object_Size/Object_Alignment. + +### Clear / reset cost +**delegate** +Clears pointers; no destructor invocation. + +**inplace_function** +May run callable’s destructor; potentially non-trivial. + +### Determinism / Real-time suitability +**delegate** +Very predictable and minimal costs at call/copy/reset; good for ISR/RT paths. + +**inplace_function** +Deterministic at call; copy/move/reset depend on callable’s traits (still allocation-free). + +## Rule of thumb +- Use `delegate` when: + You only bind free/member functions or non-owning functors and want the smallest handle with the cheapest copies. + +- Use `inplace_function` when: + You must own captured state safely (value semantics) and still avoid the heap; accept slightly larger handle/copy costs for safety. + +## Choose etl::delegate when +- You need the smallest possible callable handle (two pointers) for large arrays/vectors of callbacks. +- You must avoid any allocation, construction, destruction, or SBO buffer management in the callable wrapper. +- You bind free functions or member functions and the target object’s lifetime is externally guaranteed. +- You want trivial copy/move/equality semantics (copy two pointers; compare stub+object) for fast shuffling/lookup. +- You need deterministic, RT/ISR-safe behavior with no hidden destructors or move/destruct paths on clear/reset. +- You build static/ROM lookup tables of callbacks (compile-time create(), create()). +- You store callbacks in fixed-capacity containers (etl::array/vector) and must minimize memory per element. +- You need ABI-stable, non-owning callback tokens passed across modules without copying callables. +- You already use etl::delegate_service or similar indexed dispatch; its API expects etl::delegate. +- You don't want to size/tune an inline buffer (Object_Size/Object_Alignment) per signature or platform. + +### Typical scenarios +- Interrupt vectors, GPIO/event ISR callbacks, hard real-time control loops. +- Command/ID -> handler tables, message routing switchboards, state-machine transition actions. +- Global registries/singletons where handler objects are static or live for program lifetime. +- Shared tables of callbacks across DLLs/modules where owning captured state is undesirable. + +### Why etl::delegate over etl::inplace_function in these cases +- Lower footprint: always two pointers versus user-sized SBO buffer + vtable pointer + object pointer. +- Lower copy/move cost: trivial POD-like copies; no callable copy/move/dtor required. +- Non-owning by design: avoids accidental copies of heavy callables; no lifetime surprises at clear/reset. +- Compile-time binding support: completely payload-free delegates for fixed targets (no storage touched). +- Equality: pointer-based equality lets you deduplicate/lookup handlers efficiently. + +### Notes +- `etl::delegate` is non-owning; only choose it when the bound object outlives the delegate (rvalue lambdas are rejected by API). +- Prefer `etl::inplace_function`0 when you must own captured state (value semantics) or need to accept arbitrary lambdas safely. + +## Choose etl::inplace_function when +- You need value semantics (own the callable) so lifetimes are safe without tracking external objects. +- You want to accept arbitrary lambdas with captures and store them inline using small-buffer optimization (no heap). +- You need a single uniform callable wrapper that erases the concrete type across modules/APIs. +- You plan to copy/move callbacks between threads/queues safely (callable is self-contained in the buffer). +- You must avoid dynamic allocation but still need to store captured state (tune Object_Size/Object_Alignment). +- You want compile-time or run-time binding to free functions, member functions, and functors in one type. +- You need reset/clear semantics that correctly destroy the stored callable (RAII). +- You prefer exceptions on misuse (invoking uninitialized) to surface bugs early. + +### Typical scenarios +- Job systems, task queues, and executors that capture small state per task without heap churn. +- Pipelines and event buses that accept user-provided lambdas with captures. +- Configurable command tables where handlers carry lightweight configuration/state. +- Deferred work items, timeouts, and continuations stored in fixed-capacity containers. +- API boundaries returning/storing callbacks where the provider shouldn't manage the callee's lifetime. + +### Why etl::inplace_function over etl::delegate in these cases +- Ownership: inplace_function owns the callable; no external lifetime management needed. +- Safety with captures: stores copies/moves of lambdas/functors; no dangling pointers to external objects. +- Uniform wrapper: a single type covers free/member/functor targets with the same call site and storage. +- No heap: SBO avoids allocations while still allowing captured state; predictable embedded-friendly footprint. +- Destruction: clear()/reset() run the callable's destructor when needed; no leaks or latent state. + +### Notes +- Tune the buffer size/alignment to the largest expected callable; too-small buffers will `static_assert`. +- Copy/move cost depends on the callable; prefer lightweight captures for best performance. +- Invocation overhead is one indirect call through a vtable stub (similar to delegate). +- Use make_inplace_function helpers or create<> to bind targets; is_valid(), call_if(), and call_or() are available. +- If you only bind free/member functions and can guarantee lifetimes, etl::delegate is smaller and cheaper to copy. diff --git a/docs/callbacks/delegate.md b/docs/callbacks/delegate.md new file mode 100644 index 00000000..a07a1153 --- /dev/null +++ b/docs/callbacks/delegate.md @@ -0,0 +1,421 @@ +--- +title: "delegate" +--- + +{{< callout type="info">}} + Header: `delegate.h` + Since: `TBC` + Similar to: [std::function_ref](https://en.cppreference.com/w/cpp/utility/functional/function_ref.html) +{{< /callout >}} + +`etl::delegate` is a type-safe, generic, and efficient delegate implementation. A delegate is essentially a type-safe function pointer. + +It can be used to encapsulate a callable unit (like a function, a function pointer, member function, or a callable object like a functor or a lambda function) and call it later. + +`etl::delegate` is similar in some ways to `std::function_ref` introduced with C++26. + +The delegate functions may be defined at compile time and/or runtime, depending on the function type. +Most delegates can only be constructed via a `create` function, except lambdas and functors, which can be created by the delegate constructor. + +This may be used to implement a platform abstraction layer that allows an embedded application to interface with multiple hardware platforms. + +Here's a high-level overview of how `etl::delegate` works: + +**Creation** +When you create a delegate, you specify the function signature that it should match. This is done using template parameters. For example, `etl::delegate` creates a delegate that can hold references to functions that take an integer as an argument and return `void`. + +**Assignment** +You can assign a function to the delegate using the create method. The function you assign must match the delegate's function signature. For example, if you have a delegate of type `etl::delegate`, you could assign a function `void myFunction(int)` to it like this: + +`auto myDelegate = etl::delegate::create();` + +**Invocation** +Once a function has been assigned to the delegate, you can call that function through the delegate just like you would call a regular function. For example, if `myDelegate` is a delegate that holds a reference to `myFunction`, you could call myFunction through the delegate like this: `myDelegate(123);` + +## Notes +`<=20.21.0` +This class only supports >=C++11. + +--- + +`>=20.22.0` +This class is automatically selects C++03 or C++11 versions based on the value of `ETL_USING_CPP11` +The C++03 variant only supports delegates taking 0 or 1 parameters. + +`etl::delegate` is non-owning. You cannot use lambdas that capture variables that will have gone out of scope when the delegate is called. This would result in dangling references. Lambdas are not copied; The delegate merely keeps pointers to lambdas. This also applies to functors. + +--- + +`>=20.40.0` +Move constructors from lambdas or functors are disabled, thereby stopping a delegate being created from a temporary defined in a parameter. + +`>=20.42.0` +`etl::delegate` is `noexcept` + +--- + +`>=20.47.0` +A delegate can be created from a run-time global function pointer, or a non-capturing lambda. + +--- + +`>=20.22.0` +*For C++03* +`etl::delegate` +`etl::delegate` + +For the examples below, assume the following definitions. + +```cpp +class Test +{ +public: + + int member_function(int); + static int member_static(int); + int operator()(int); + int operator()(int) const; +}; + +Test test; + +int global(int); + +auto lambda = [](int i){ return i; }; +``` + +**Public types** + +```cpp +return_type TReturn 20.43.0 +argument_types etl::type_list 20.43.0 +``` + +### Run time construction + +**Lambdas** +```cpp +etl::delegate d(lambda); +etl::delegate d = lambda; +etl::delegate d = etl::delegate::create(lambda); + +d.set(lambda); +``` + +**Functors** +```cpp +etl::delegate d(test); +etl::delegate d = test; +etl::delegate d = etl::delegate::create(test); + +d.set(); +``` + +**Member functions** +```cpp +etl::delegate d = etl::delegate::create(test); + +d.set(test); +d.set(); +``` + +### Compile time construction + +**Global functions** +```cpp +auto d = etl::delegate::create(); +``` + +**Member functions** (if the instance is known at compile time) +```cpp +auto d = etl::delegate::create(); // Deprecated +auto d = etl::delegate::create(); // New +``` + +**Functors** (if the instance is known at compile time) +```cpp +auto d = etl::delegate::create(); +auto d = etl::delegate::create(); +``` +Note: These are disabled for GCC <= v8.1 as it generates an 'Internal Compiler Error'. + +**Static member functions** +```cpp +auto d = etl::delegate::create(); +``` + +**Global functions or non-capturing lambdas** +*From 20.47.0* +```cpp +auto d = etl::delegate::create(+[](int a){ return a * 2; }) +``` + +### Constexpr + +Most delegates can be declared as `constexpr`. (C++11 and above) +```cpp +static Test test; +constexpr auto d = etl::delegate::create(); +``` + +All create functions are `constexpr` under C++14. +All create functions are `[[nodiscard]]` under C++17. + +`>=TBC` +The runtime function-pointer overloads `delegate(function_ptr)` and +`create(function_ptr)` are usable in constant expressions from C++14. +The mutating overloads `set(function_ptr)` and `operator=(function_ptr)` are +usable in constant expressions from C++20 (they switch the active member of +an internal union, which became permitted in constant expressions in C++20 +per [P1330R0](https://wg21.link/P1330R0)). + +```cpp +constexpr auto d1 = etl::delegate(&global); +constexpr auto d2 = etl::delegate::create(&global); +``` + +### Calling the delegate + +The delegate may be called as a function with the defined parameter signature. + +```cpp +etl::delegate d; + +int r = d(3); +``` + +## Types + +`return_type` The return type of the callback. +`argument_types` An `etl::type_list` of the arguments. + +## Constructors + +```cpp +ETL_CONSTEXPR14 delegate() ETL_NOEXCEPT +``` +**Description** +Constructs an uninitialised delegate. + +--- + +```cpp +ETL_CONSTEXPR14 delegate(const delegate& other) ETL_NOEXCEPT +``` +**Description** +Copy constructs a delegate. + +--- + +```cpp +explicit ETL_CONSTEXPR14 delegate(TReturn (*)(TArgs...) fp) ETL_NOEXCEPT +``` +**Description** +Constructs from a run-time function pointer, or non-capturing lambda converted to a function pointer. +*From `20.47.0`* +*Constexpr from `TBC`* + +## Creation + +```cpp +template +ETL_NODISCARD +static ETL_CONSTEXPR14 delegate create() ETL_NOEXCEPT +``` +**Description** +Create from a global function (Compile time). + +**Returns** +A constructed delegate. + +--- + +```cpp +ETL_NODISCARD +static ETL_CONSTEXPR14 delegate create(function_ptr fp) ETL_NOEXCEPT +``` +**Description** +Create from a run-time function pointer. +*From `20.47.0`* +*Constexpr from `TBC`* + +**Returns** +A constructed delegate. + +--- + +```cpp +template +ETL_NODISCARD +static ETL_CONSTEXPR14 delegate create(TLambda& instance) ETL_NOEXCEPT +``` +**Description** +Create from lambda or functor. + +**Returns** +A constructed delegate. + +## Calling the delegate + +```cpp +ETL_CONSTEXPR14 TReturn operator()(TParams... args) const ETL_NOEXCEPT +``` +**Description** +Calls the delegate. +`constexpr` from `20.42.1` + +--- + +20.17.0 +```cpp +ETL_CONSTEXPR14 bool call_if(TParams... args) const ETL_NOEXCEPT +``` +**Description** +For delegates returning void. +Calls the delegate if valid. +Returns `true` if valid, otherwise `false`. +`constexpr` from `20.42.2` + +--- + +```cpp +ETL_CONSTEXPR14 etl::optional call_if(TParams... args) const ETL_NOEXCEPT +``` +**Description** +For delegates returning `TReturn`. +Calls the delegate if valid. +Returns a valid `etl::optional` containing the return value, if valid. +`constexpr` from `20.42.2` + +--- + +20.17.0 +```cpp +template +ETL_CONSTEXPR14 TReturn call_or(TAlternative alternative, TParams... args) const ETL_NOEXCEPT +``` +**Description** +Calls the delegate if valid, otherwise calls `alternative`. +`constexpr` from `20.42.2` + +--- + +```cpp +template +ETL_CONSTEXPR14 TReturn call_or(TParams... args) const ETL_NOEXCEPT +``` +**Description** +Calls the delegate if valid, otherwise calls `Method`. + +## Modifiers + +```cpp +void clear() ETL_NOEXCEPT +``` +**Description** +Sets the delegate back to the uninitialised state. + +## Status + +```cpp +ETL_NODISCARD ETL_CONSTEXPR14 bool is_valid() const ETL_NOEXCEPT +ETL_CONSTEXPR14 operator bool() const +``` +**Description** +Returns true if the delegate has been initialised, otherwise `false`. + +--- + +```cpp +ETL_CONSTEXPR14 operator =() ETL_NOEXCEPT +``` +**Description** +Assigns from a delegate or lambda. + +--- + +```cpp +ETL_CONSTEXPR14 operator ==() ETL_NOEXCEPT +ETL_CONSTEXPR14 operator !=() ETL_NOEXCEPT +``` +**Description** +Compares delegates. + +## Make a delegate + +```cpp +make_delegate +``` +**Description** +For C++17 and above. +`20.39.5` + +--- + +```cpp +template +constexpr auto make_delegate() noexcept +``` +**Description** +Make a delegate from a free function. +Returns `etl::delegate::create()` + +--- + +```cpp +template +constexpr auto make_delegate(TLambda& instance) noexcept +``` +**Description** +Make a delegate from a functor or lambda function. +Returns `etl::delegate(instance)` + +--- + +```cpp +template +constexpr auto make_delegate() noexcept +``` +**Description** +Make a delegate from a functor, compile time. +Returns `etl::delegate::create()` + +--- + +```cpp +template +constexpr auto make_delegate() noexcept +``` +**Description** +Make a delegate from a member function at compile time. +Returns `etl::delegate::create()` + +--- + +```cpp +template +constexpr auto make_delegate() noexcept +``` +**Description** +Make a delegate from a const member function at compile time. +Returns `etl::delegate::create()` + +--- + +```cpp +template +constexpr auto make_delegate(T& instance) noexcept +``` +**Description** +Make a delegate from a member function at run time. +Returns `etl::delegate::create(instance)` + +--- + +```cpp +template +constexpr auto make_delegate(const T& instance) noexcept +``` +**Description** +Make a delegate from a member function at run time. +Returns `etl::delegate::create(instance)` diff --git a/docs/callbacks/delegate_observable.md b/docs/callbacks/delegate_observable.md new file mode 100644 index 00000000..2b9249a4 --- /dev/null +++ b/docs/callbacks/delegate_observable.md @@ -0,0 +1,115 @@ +--- +title: "delegate_observable" +--- + +{{< callout type="info">}} + Header: `delegate_observable.h` + Since: `TBC` +{{< /callout >}} + +`etl::delegate_observable` is a variation on the observer pattern idea, but using delegates as the callback mechanism. + +```cpp +template +class delegate_observable +``` + +`TNotification` is the notification type. +`Max_Observers` is the maximum number of observers that can be handled. + +## Template deduction guide + +```cpp +template +delegate_observable(TNotification, TDelegates...) + -> delegate_observable; +``` + +**Example** +```cpp +etl::delegate delegate1; +etl::delegate delegate2; + +etl::delegate_observable observable(int{}, delegate1, delegate2); +``` + +## Public types + +| Type | Description | +| ------------------- | ------------------------------------------- | +| `delegate_type` | The type of delegate used in this observer. | +| `size_type` | The type used internally for sizes. | +| `notification_type` | The type of the notification. | + +## Construction + +```cpp +ETL_CONSTEXPR14 delegate_observable() +``` +**Description** +Default constructor. + +--- + +```cpp +template +ETL_CONSTEXPR14 delegate_observable(TDelegate&&... delegates) +``` +**Description** +Construct from a collection of observers. + +--- + +```cpp +template +ETL_CONSTEXPR14 delegate_observable(notification_type, TDelegate&&... delegates) +``` +**Description** +Construct from notification type and a list of observers. +Variant for template deduction guide. +The notification value is ignored. It is here to allow deduction of the notification type for the template deduction guide. + +## Modifiers + +```cpp +ETL_CONSTEXPR14 bool add_observer(delegate_type observer) +``` +**Description** +Add an observer to the list. + +**Return** +`true` if the observer was removed, `false` if not. + +--- + +```cpp +ETL_CONSTEXPR14 bool remove_observer(const delegate_type& observer) +``` +**Description** +Remove a particular observer from the list. +**Return** +`true if the observer was removed, false if not. + +--- + +```cpp +ETL_CONSTEXPR14 void clear_observers() +``` +**Description** +Clear all observers. + +## Status + +```cpp +ETL_CONSTEXPR14 size_type number_of_observers() const +``` +**Return** +The number of observers. + +## Notofication + +```cpp +ETL_CONSTEXPR14 void notify_observers(notification_type n) const +``` +**Description** +Notify all of the observers, sending them the notification. diff --git a/docs/callbacks/function.md b/docs/callbacks/function.md new file mode 100644 index 00000000..7785b0f1 --- /dev/null +++ b/docs/callbacks/function.md @@ -0,0 +1,332 @@ +--- +title: "function" +--- + +{{< callout type="warning">}} + Deprecated: Please use the more versatile `etl::delegate` or `etl::inplace_function` classes instead. +{{< /callout >}} + +{{< callout type="info">}} + Header: `function.h` + Since: `TBC` +{{< /callout >}} + +A set of wrapper templates to allow a member or static function to be called without the caller having to know the specific details of the callee apart from the parameter type. The templates allow the called function to be abstracted. + +This may be used to implement a platform abstraction layer that allows an embedded application to interface with multiple hardware platforms. + +| Template | Description | +| ----------------- | ------------------------------------------------------------------------- | +| etl::function | Callbacks to free or member functions taking zero or one parameter.
Function pointer at runtime. | +| etl::function_fv | Callback to a free function taking no parameters. (Functiion Void).
Function pointer at compile time. | +| etl::function_fp | Callback to a free function taking one parameter. (Function Parameter).
Function pointer at compile time. +| etl::function_mv | Callback to a member function taking no parameters. (Member Void).
Function pointer at compile time. | +| etl::function_imv | Callback to a member function taking no parameters. (Instance Member Void ).
Instance reference and function pointer at compile time. | +| etl::function_mp | Callback to a member function taking one parameter. (Member Parameter).
Function pointer at compile time.| +| etl::function_imp | Callback to a member function taking one parameter. (Instance Member Parameter).
Instance reference and function pointer at compile time.| + +*Instances of any of these types may be passed as pointers or references to etl::ifunction.* + +## Interface classes. + +```cpp +template +class ifunction +``` +**Description** +Interface class for a function taking one parameter. + +--- + +```cpp +template <> +class ifunction +``` +**Description** +Interface class for a function taking no parameters. + +**All of the following classes are derived from the above interface classes.** + +## Function address at run time. +The functions are called indirectly through an internal pointer. + +```cpp +template +class function : public ifunction +``` +**Description** +Class for a member function taking one parameter. + +--- + +```cpp +template +class function : public ifunction +``` +**Description** +Class for a member function taking no parameters. + +```cpp +template +class function : public ifunction +``` +**Description** +Class for a free function taking one parameter. + +--- + +```cpp +template <> +class function : public ifunction +``` +**Description** +Class for a free function taking no parameters. + +## Function address at compile time. +These will be more efficient than the previous definitions, as the one level of indirection is eliminated. + +```cpp +template +class function_mv : public ifunction +``` +**Description** +Class for a member function taking no parameters. + +--- + +```cpp +template +class function_imv : public ifunction +``` +**Description** +Class for a member function taking no parameters. + +--- + +```cpp +template +class function_mp : public ifunction +``` +**Description** +Class for a member function taking one parameter. + +--- + +```cpp +template +class function_imp : public ifunction +``` +**Description** +Class for a member function taking one parameter. + +--- + +```cpp +template +class function_fv : public ifunction +``` +**Description** +Class for a free function taking no parameters. + +--- + +```cpp +template +class function_fp : public ifunction +``` +**Description** +Class for a free function taking one parameter. + +## Example + +```cpp +etl::function +``` + +These templates are designed to enable easy creation of callbacks to global, static and class member functions without the caller having to know which type actually it is. + +One use that is applicable to embedded platforms is to use them connect interrupt vectors to class member handling functions. Particularly useful when the code is applicable to multiple targets devices. + +The template is designed in such a way that the caller does not need to be aware of the type of the callee. + +The caller declares an instance of `etl::function` or one of its variants. The caller defines a pointer or reference to an `etl::ifunction`. This pointer or reference will be initialised with the instance defined in the caller. + +**Example** + +The interrupt vector table contains entries for three timer timeouts and two uart character rx handlers. These are vectored to normal static functions. + +```cpp +void Timer1TimeoutInterrupt(); +void Timer2TimeoutInterrupt(); +void Timer3TimeoutInterrupt(); +void Uart1RxInterrupt(); +void Uart2RxInterrupt(); +``` + +The timer timeout interrupts are handled by an instance of the class `Timer` and the free function `FreeTimerInterruptHandler`. The UART Rx interrupts are handled by instances of the class `Uart`. + +`Timer1` interrupts call the member function of an instance of `Timer`. +`Timer2` interrupts call the static member function of `Timer`. +`Timer3` interrupts call the free function `FreeTimerInterruptHandler`. +`UART1` interrupts call the member function of instance 1 of `Uart`. +`UART1` interrupts call the member function of instance 2 of `Uart`. + +```cpp +#include +#include + +#include "function.h" + +//******************************** +// Fake UART Rx register. +//******************************** +char get_char() +{ + static char c = 'A'; + return c++; +} + +//******************************** +// Interrupt vectors & callbacks. +//******************************** +// Callback interfaces. +// Note that they do not require any knowledge about the callee apart from the parameter type. +etl::ifunction* timer1_callback; // A pointer to a callback taking no parameters. +etl::ifunction* timer2_callback; // A pointer to a callback taking no parameters. +etl::ifunction* timer3_callback; // A pointer to a callback taking no parameters. +etl::ifunction* uart1_rx_callback; // A pointer to a callback taking a char parameter. +etl::ifunction* uart2_rx_callback; // A pointer to a callback taking a char parameter. + +extern "C" +{ +// Function called from the timer1 interrupt vector. +void Timer1Interrupt() +{ + (*timer1_callback)(); +} + +// Function called from the timer2 interrupt vector. +void Timer2Interrupt() +{ + (*timer2_callback)(); +} + +// Function called from the timer3 interrupt vector. +void Timer3Interrupt() +{ + (*timer3_callback)(); +} + +// Function called from the UART1 rx interrupt vector. +void Uart1RxInterrupt() +{ + (*uart1_rx_callback)(get_char()); +} + +// Function called from the UART2 rx interrupt vector. +void Uart2RxInterrupt() +{ + (*uart2_rx_callback)(get_char()); +} +} + +//******************************** +// Timer driver. +//******************************** +class Timer +{ +public: + + // Constructor. + Timer() + { + } + + // Handler for interrupts from the timer. + void MemberTimerInterruptHandler() + { + std::cout << "Timer interrupt (member)\n"; + } + + // Static handler for interrupts from the timer. + static void StaticTimerInterruptHandler() + { + std::cout << "Timer interrupt (static)\n"; + } +}; + +//******************************** +// Free function timer driver. +//******************************** +void FreeTimerInterruptHandler() +{ + std::cout << "Timer interrupt (free)\n"; +} + +etl::function_fv free_callback; + +//******************************** +// UART driver. +//******************************** +class Uart +{ +public: + + // Constructor. + Uart(int port_id) + : port_id(port_id) + { + } + + // Handler for rx interrupts from the UART. + void RxInterruptHandler(char c) + { + std::cout << "UART" << port_id << " Rx char interrupt : Received '" << c << "'\n"; + } + + int port_id; +}; + +// Declare the driver instances. +Timer timer; +Uart uart1(0); +Uart uart2(1); + +etl::function_imv timer_member_callback; +etl::function_fv<&Timer::StaticTimerInterruptHandler> timer_static_callback; +etl::function_imp uart1_callback; +etl::function_imp uart2_callback; + +//******************************** +// Test it out. +//******************************** +int main() +{ + + // Setup the callbacks. + timer1_callback = &timer_member_callback; + timer2_callback = &timer_static_callback; + timer3_callback = &free_callback; + uart1_rx_callback = &uart1_callback; + uart2_rx_callback = &uart2_callback; + + // Simulate the interrupts. + Timer1Interrupt(); + Timer2Interrupt(); + Timer3Interrupt(); + Uart1RxInterrupt(); + Uart2RxInterrupt(); + + return 0; +} +``` diff --git a/docs/callbacks/inplace_function.md b/docs/callbacks/inplace_function.md new file mode 100644 index 00000000..6e675a54 --- /dev/null +++ b/docs/callbacks/inplace_function.md @@ -0,0 +1,414 @@ +--- +title: "inplace_function" +weight: 1 +--- + +{{< callout type="info">}} + Header: `inplace_function.h` + From: `20.45.0` + Similar to: [std::function](https://en.cppreference.com/w/cpp/utility/functional/function.html) +{{< /callout >}} + +A small, in-place function wrapper that stores callable objects inside a fixed-size buffer (no dynamic allocation). It supports free functions, member functions, functors, and lambdas, with both runtime and compile-time bindings. + +```cpp +template +class inplace_function; +``` + +The defaults are defined as follows:- + +```cpp +#if !defined(ETL_DEFAULT_INPLACE_FUNCTION_SIZE) + #define ETL_DEFAULT_INPLACE_FUNCTION_SIZE 32 +#endif +``` + +```cpp +#if !defined(ETL_DEFAULT_INPLACE_FUNCTION_ALIGNMENT) + #define ETL_DEFAULT_INPLACE_FUNCTION_ALIGNMENT alignof(void*) +#endif +``` + +Set your own definitions if you require different defaults. + +## Template Parameters + +```cpp +TSignature +``` +**Description** +The function signature. e.g. `int(char, float)` + +--- + +```cpp +Object_Size +``` +**Description** +Size of the internal storage buffer. +Defaults to `ETL_DEFAULT_INPLACE_FUNCTION_SIZE`. + +--- + +```cpp +Object_Alignment +``` +**Description** +Alignment of the internal storage buffer. +Defaults to `ETL_DEFAULT_INPLACE_FUNCTION_ALIGNMENT`. + +## Exceptions + +```cpp +etl::inplace_function_exception +``` +**Description** +Base exception. + +--- + +```cpp +etl::inplace_function_uninitialized +``` +**Description** +Thrown (via `ETL_ASSERT`) when invoked without a target. + +## Member Types + +```cpp +function_type +``` +**Description** + +--- + +```cpp +return_type +``` +**Description** + +--- + +```cpp +argument_types +``` +**Description** + +## Constructors + +**Description** +Default constructor. + +**Description** +Copy/move constructors. + +**Description** +Construction from a free function pointer. + +**Description** +Construction from an object + member function pointer (const or non-const). + +**Description** +Construction from a lambda/functor (const or non-const). + +## Assignment + +**Description** +Copy/move assignment. + +--- + +**Description** +Assignment from nullptr clears the target. + +--- + +**Description** +Assignment from function pointer. + +--- + +**Description** +Assignment from lambda/functor. + +## Invocation + +```cpp +operator() +``` +**Description** +Invokes the bound callable and asserts if uninitialised. + +**Parameters** + +**Returns** + +--- + +```cpp +call_if(...) +``` +**Description** +Calls the delegate function, if valid. +Indicates success in the return type. + +**Parameters** +`TArgs...` + +**Returns** +For `void` return `bool` indicating whether it executed. +For non-void returns `etl::optional`. + +--- + +```cpp +call_or(...) +``` +**Description** +Invokes the target or a fallback callable. + +**Parameters** + +**Returns** + +## Observers + +```cpp +bool is_valid() const +``` +**Returns** +`true` if there is a valid callable. + +--- + +```cpp +explicit operator bool() const +``` +**Description** + +**Parameters** + +**Returns** +The result of `is_valid()` + +## Modifiers + +```cpp +void clear() +``` +**Description** +Clears any stored callable. + +**Parameters** +None + +**Returns** +`void` + +--- + +```cpp +void swap(inplace_function& other) +``` +**Description** +Swaps with another inplace_function. + + +**Parameters** +None + +**Returns** +'void` + +## Storage Introspection + +```cpp +static constexpr size_t size() +``` +**Description** +Interogates the internal storage size. + +**Parameters** +None + +**Returns** +The size of the internal storage. + +--- + +```cpp +static constexpr size_t alignment() +``` +**Description** +Interogates the internal storage alignment. + +**Parameters** +None + +**Returns** +The alignment of the internal storage. + +## Compile-Time Binding (No Payload) + +### Free function + +```cpp +template +void set() +``` +**Description** +Sets the callable to `Function`. + +--- + +```cpp +template +inplace_function create() +``` +**Description** +Creates an `etl::inplace_function` using `Function`. + +--- + +### Member function + instance (external linkage) + +```cpp +template +set() +``` +**Description** +Sets the callable to the member function `Method` for the object `Instance`. + +--- + +```cpp +create() +``` +**Description** + +**Parameters** + +**Returns** + +--- + +### Callable object + instance (operator()) + +```cpp +set() +``` +**Description** + +**Parameters** + +**Returns** + +--- + +```cpp +create() +``` +**Description** + +**Parameters** + +**Returns** + +## Helper Aliases + +```cpp +etl::inplace_function_for +``` +**Description** + +**Parameters** + +**Returns** + +--- + +```cpp +etl::inplace_function_for_any +``` +**Description** + +**Parameters** + +**Returns** + +## Helper Factories + +```cpp +make_inplace_function(function_ptr) +``` +**Description** + +**Parameters** + +**Returns** + +```cpp +make_inplace_function(obj, &Type::Method) +``` +**Description** + +**Parameters** + +**Returns** + +```cpp +make_inplace_function(lambda_or_functor) +``` +**Description** + +```cpp +make_inplace_function(function_like) +``` +**Description** + +**Parameters** + +**Returns** + +C++17-only overloads also exist for compile-time binding. + +## Example + +```cpp +#include "etl/inplace_function.h" + +int add(int a, int b) { return a + b; } + +struct Accumulator +{ + int base = 0; + + int add_to(int v) { return base + v; } +}; + +void example() +{ + etl::inplace_function f(add); + int sum = f(1, 2); + + Accumulator acc{ 10 }; + + etl::inplace_function g(&Accumulator::add_to, acc); + + int result = g(5); +} +``` + +## Notes + +If the callable object is larger than `Object_Size` or requires stricter alignment than `Object_Alignment`, compilation fails with a `static_assert`. + + +`operator()` asserts when called without a target; use `call_if` or `call_or` to avoid this. + +Prefer `inplace_function_for`, `inplace_function_for_any` or `make_inplace_function` to deduce storage sizes safely. diff --git a/docs/callbacks/signal.md b/docs/callbacks/signal.md new file mode 100644 index 00000000..a8c19efc --- /dev/null +++ b/docs/callbacks/signal.md @@ -0,0 +1,327 @@ +--- +title: "signal" +--- + +{{< callout type="info">}} + Header: `signal.h` + From: `20.44.0` +{{< /callout >}} + +A class that implements simple signal/slot framework. +Uses `etl::delegate` as the default slot type, though other types may be used. + +```cpp +template > +class signal +``` +`TFunction` The callback function signature. +`Size` The maximum numbr of slots for the signal. +`TSlot` The callback slot type. Default = `etl::delegate` + +## Types +`slot_type` Defined as the slot type. +`size_type` The size type used internally. +`span_type` The span type used in the connect API. + +## Constructors +```cpp +template +ETL_CONSTEXPR14 explicit signal(TSlots&&... slots) ETL_NOEXCEPT +``` +Construct the signal from a variadic list of slots. +Can be used as a `constexpr` constructor. +Static asserts if any of the slots are not `slot_type`. +Static asserts if the number of slots exceeds capacity. + +## Connect +```cpp +bool connect(const slot_type& slot) +``` +Connects the slot, if not already connected and returns `true`. +If the signal is full, asserts `etl::signal_full` and returns `false`. + +--- + +```cpp +bool connect(std::initializer_list slots) +``` +Connects all of the slots and returns `true`. +If the number of slots exceeds the signal's max size, asserts an `etl::signal_full` and returns `false`. +Enabled if `ETL_HAS_INITIALIZER_LIST` and `ETL_USING_CPP17` are defined as `1`. + +--- + +```cpp +bool connect(const span_type slots) +``` +Connects all of the slots and returns `true`. +If the number of slots exceeds the signal's max size, asserts an `etl::signal_full` and returns `false`. + +## Disconnect + +```cpp +void disconnect(const slot_type& slot) ETL_NOEXCEPT +``` +Disconnects slot from the signal. +If the signal does not contain the slot there is no error. + +--- + +```cpp +void disconnect(std::initializer_list slots) ETL_NOEXCEPT +``` +Disconnects all of the slots from the signal. +If the signal does not contain a particular slot, there is no error. +Enabled if `ETL_HAS_INITIALIZER_LIST` and `ETL_USING_CPP17` are defined as `1`. + +--- + +```cpp +void disconnect(const span_type slots) ETL_NOEXCEPT +``` +Disconnects all of the slots from the signal. +If the signal does not contain a particular slot, there is no error. + +```cpp +void disconnect_all() ETL_NOEXCEPT +``` +Disconnects all slots from the signal. + +## Status + +```cpp +ETL_CONSTEXPR14 bool connected(const slot_type& slot) const ETL_NOEXCEPT +``` +Checks if a slot is connected to the signal. + +--- + +```cpp +ETL_CONSTEXPR14 bool empty() const ETL_NOEXCEPT +``` +Return `true` if the signal has no slots connected. + +--- + +```cpp +ETL_CONSTEXPR14 bool full() const ETL_NOEXCEPT +``` +Return `true` if the signal has the maximum number of slots connected. + +--- + +```cpp +ETL_CONSTEXPR14 size_type max_size() const ETL_NOEXCEPT +``` +Returns the total number of slots that can be connected. + +--- + +```cpp +ETL_CONSTEXPR14 size_type size() const ETL_NOEXCEPT +``` +Returns the total slots currently connected. + +--- + +```cpp +ETL_CONSTEXPR14 size_type available() const ETL_NOEXCEPT +``` +Returns the total empty slots available. + +## Call +```cpp +template +void operator()(TArgs&&... args) const ETL_NOEXCEPT +``` +Function operator that calls each slot with the supplied parameters. + +## Errors + +```cpp +etl::signal_full +``` +Indicates that an attempt to add a slot to a full signal occurred. +Inherits from `etl::signal_exception`. + +## Examples + +```cpp +constexpr size_t MaxSlots = 3; + +using callback_type = void(int a, int b); +using signal_type = etl::signal; +using slot_type = signal_type::slot_type; +using span_type = signal_type::span_type; + +using not_slot_type = etl::delegate; +``` + +**Defining the slot functions** + +```cpp +void Function1(int a, int b) +{ + std::cout << "Function1: " << a << "," << b << "\n"; +} + +void Function2(int a, int b) +{ + std::cout << "Function2: " << a << "," << b << "\n"; +} + +void Function3(int a, int b) +{ + std::cout << "Function3: " << a << "," << b << "\n"; +} +0 +void Function4(int a, int b) +{ + std::cout << "Function4: " << a << "," << b << "\n"; +} + +void Function5(int a) +{ + std::cout << "Function5: " << a << "\n"; +} +``` + +**Creating the slots** + +```cpp +constexpr slot_type MakeSlot1() noexcept +{ +return slot_type::create(); +} + +constexpr slot_type MakeSlot2() noexcept +{ +return slot_type::create(); +} + +constexpr slot_type MakeSlot3() noexcept +{ +return slot_type::create(); +} + +constexpr slot_type MakeSlot4() noexcept +{ +return slot_type::create(); +} + +constexpr not_slot_type MakeSlot5() noexcept +{ +return not_slot_type::create(); +} +``` + +**Define the signals as `constexpr`** + +```cpp +// Define the signal and connect as constexpr +constexpr signal_type({ MakeSlot1(), MakeSlot2(), MakeSlot3() }); + +// Define the signal and connect as constexpr. +// Static assert "Number of slots exceeds capacity" +constexpr signal_type({ MakeSlot1(), MakeSlot2(), MakeSlot3(), MakeSlot4() }); + +// Define the signal and connect as constexpr. +// Static assert "All slots must be slot_type" +constexpr signal_type({ MakeSlot1(), MakeSlot2(), MakeSlot5() }); +``` + +**Defining the signal at runtime** + +```cpp +// Define the signal. +signal_type signal; + +// Connect one at a time. +signal.connect(MakeSlot1()); +signal.connect(MakeSlot2()); +signal.connect(MakeSlot3()); + +// Connect using initializer_list. +signal.connect({ MakeSlot1(), MakeSlot2(), MakeSlot3() }); + +// Connect using span. +const slot_type slot_list[] = { MakeSlot1(), MakeSlot2(), MakeSlot3() }; +signal.connect(slot_list); +``` + +**Checking the status** + +```cpp +// Define the signal. +signal_type signal; + +signal.max_size() // Returns 3 +signal.size() // Returns 0 +signal.available() // Returns 3 +signal.empty(); // Returns true +signal.full(); // Returns false +signal.connected(MakeSlot1()) // Returns false +signal.connected(MakeSlot2()) // Returns false +signal.connected(MakeSlot3()) // Returns false + +signal.connect(MakeSlot1()); // Returns true + +signal.max_size() // Returns 3 +signal.size() // Returns 1 +signal.available() // Returns 2 +signal.empty(); // Returns false +signal.full(); // Returns false +signal.connected(MakeSlot1()) // Returns true +signal.connected(MakeSlot2()) // Returns false +signal.connected(MakeSlot3()) // Returns false + +signal.connect(MakeSlot1()); // Already connected. Returns true + +signal.max_size() // Returns 3 +signal.size() // Returns 1 +signal.available() // Returns 2 +signal.empty(); // Returns false +signal.full(); // Returns false +signal.connected(MakeSlot1()) // Returns true +signal.connected(MakeSlot2()) // Returns false +signal.connected(MakeSlot3()) // Returns false + +signal.connect(MakeSlot2()); // Returns true + +signal.max_size() // Returns 3 +signal.size() // Returns 2 +signal.available() // Returns 1 +signal.empty(); // Returns false +signal.full(); // Returns false +signal.connected(MakeSlot1()) // Returns true +signal.connected(MakeSlot2()) // Returns true +signal.connected(MakeSlot3()) // Returns false + +signal.connect(MakeSlot3()); // Returns true + +signal.max_size() // Returns 3 +signal.size() // Returns 3 +signal.available() // Returns 0 +signal.empty(); // Returns false +signal.full(); // Returns true +signal.connected(MakeSlot1()) // Returns true +signal.connected(MakeSlot2()) // Returns true +signal.connected(MakeSlot3()) // Returns true + +signal.connect(MakeSlot4()); // ETL_ASSERT etl::signal_full. Returns false +``` + +**Calling the signal** + +```cpp +signal_type signal({ MakeSlot1(), MakeSlot2(), MakeSlot3() }); + +signal(1, 2); // Call all of the slots with the parameters 1 & 2 +``` + +**Output** +``` +Function1: 1,2 +Function2: 1,2 +Function3: 1,2 +``` diff --git a/docs/chrono/_index.md b/docs/chrono/_index.md new file mode 100644 index 00000000..80e4e3df --- /dev/null +++ b/docs/chrono/_index.md @@ -0,0 +1,12 @@ +--- +title: "Chrono" +weight: 100 +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono](https://en.cppreference.com/w/cpp/chrono.html) +{{< /callout >}} + +An implementation of C++11's date and time library. diff --git a/docs/chrono/chrono-literals.md b/docs/chrono/chrono-literals.md new file mode 100644 index 00000000..76b3ed5e --- /dev/null +++ b/docs/chrono/chrono-literals.md @@ -0,0 +1,38 @@ +--- +title: "Chrono literals" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::literals::chrono_literals](https://en.cppreference.com/w/cpp/chrono.html#Literals) +{{< /callout >}} + +The ETL Chrono literals are define slightly differently from the STL in that they are *user* defined, as opposed to *language* defined. + +**Example** +For STL, the literal to define year `2025` would be `2025y`. +For ETL, the literal is `2025_y`. + +By default, the ETL uses the designations of the STL. +As this may clash with other user defined literals, the ETL allows more verbose forms to be used, by defining the macro `ETL_USE_VERBOSE_CHRONO_LITERALS`. +If enabled, the example of `2025_y` would be written as `2025_year`. + +| Duration type | STL like | Verbose | +| --------------------------- | ---------- | ------------------- | +| `etl::chrono::year` | `2025_y` | `2025_year` | +| `etl::chrono::day` | `10_d` | `10_day` | +| `etl::chrono::hours` | `14_h` | `14_hours` | +| `etl::chrono::minutes` | `30_min` | `30_minutes` | +| `etl::chrono::seconds` | `45_s` | `45_seconds` | +| `etl::chrono::milliseconds` | `500_ms` | `500_milliseconds` | +| `etl::chrono::microseconds` | `500_us` | `500_microseconds` | +| `etl::chrono::nanoseconds` | `500_ns` | `500_nanoseconds` | + +Chrono literals may by accessed by using one of the following namespaces. + +```cpp +using namespace etl::chrono; +using namespace etl::literals; +using namespace etl::chrono_literals; +``` diff --git a/docs/chrono/clocks.md b/docs/chrono/clocks.md new file mode 100644 index 00000000..9ca0fb3e --- /dev/null +++ b/docs/chrono/clocks.md @@ -0,0 +1,123 @@ +--- +title: "Clocks" +--- + +## Macros +Default macro definitions. +Define these in `etl_profile.h` to set your own duration types for the clocks. + +| Macro | Definition | +| -------------------------------------------- | -------------------------- | +| `ETL_CHRONO_SYSTEM_CLOCK_DURATION` | `etl::chrono::nanoseconds` | +| `ETL_CHRONO_SYSTEM_CLOCK_IS_STEADY` | `true` | +| `ETL_CHRONO_HIGH_RESOLUTION_CLOCK_DURATION` | `etl::chrono::nanoseconds` | +| `ETL_CHRONO_HIGH_RESOLUTION_CLOCK_IS_STEADY` | `true` | +| `ETL_CHRONO_STEADY_CLOCK_DURATION` | `etl::chrono::nanoseconds` | + +## Platform clock access +Declarations of the functions that must be defined to interface the clocks with the underlying platform. + +```cpp +extern "C" ETL_CHRONO_SYSTEM_CLOCK_DURATION::rep etl_get_system_clock(); +extern "C" ETL_CHRONO_HIGH_RESOLUTION_CLOCK_DURATION::rep etl_get_high_resolution_clock(); +extern "C" ETL_CHRONO_STEADY_CLOCK_DURATION::rep etl_get_steady_clock(); +``` + +These functions must return the current count of the underlying clock. The value is in terms of the +clock duration defined for that clock. + +**Example** +If the `system_clock` duration is set to `etl::chrono::nanoseconds`, then a return value of `1000` represents `1000ns`. + +## system_clock + +```cpp +class system_clock +``` + +### Member types +```cpp +using duration = ETL_CHRONO_SYSTEM_CLOCK_DURATION +using rep = duration::rep +using period = duration::period +using time_point = time_point +``` + +### Member functions +```cpp +static time_point now() ETL_NOEXCEPT +static time_t to_time_t(const time_point& t) ETL_NOEXCEPT +static time_point from_time_t(time_t t) ETL_NOEXCEPT +``` + +## high_resolution_clock +```cpp +class high_resolution_clock +``` + +### Member types +```cpp +using duration = ETL_CHRONO_HIGH_RESOLUTION_CLOCK_DURATION +using rep = duration::rep +using period = duration::period +using time_point = time_point +``` + +### Member functions +```cpp +static time_point now() ETL_NOEXCEPT +``` + +## steady_clock +```cpp +class steady_clock +``` + +### Member types +```cpp +using duration = ETL_CHRONO_STEADY_CLOCK_DURATION +using rep = duration::rep +using period = duration::period +using time_point = time_point +``` + +### Member functions +```cpp +static time_point now() ETL_NOEXCEPT +``` + +## system_time +```cpp +template +using sys_time = etl::chrono::time_point + +using sys_seconds = sys_time +using sys_days = sys_time +``` + +## local_time +```cpp +struct local_t +``` + +```cpp +template +using local_time = etl::chrono::time_point + +using local_seconds = local_time +using local_days = local_time +``` + +## clock_cast + +Cast a time point from one clock to another. +This implementation assumes all clock epochs are the same. + +```cpp +template +ETL_CONSTEXPR14 etl::chrono::time_point + clock_cast(const etl::chrono::time_point& from_time_point) ETL_NOEXCEPT +``` diff --git a/docs/chrono/day.md b/docs/chrono/day.md new file mode 100644 index 00000000..ec123908 --- /dev/null +++ b/docs/chrono/day.md @@ -0,0 +1,317 @@ +--- +title: "day" +--- + +{{< callout type="info">}} + Header: `chrono.h` + Since: `TBC` + Similar to: [std::chrono::day](https://en.cppreference.com/w/cpp/chrono/day.html) +{{< /callout >}} + +A class representing a day. + +```cpp +class day +``` + +## Typesdefs +rep The internal representation. + +## Construction +```cpp +ETL_CONSTEXPR +day() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- +```cpp +ETL_CONSTEXPR +explicit day(unsigned value) +ETL_NOEXCEPT +``` +**Description** +Construct from unsigned. + +--- + +```cpp +ETL_CONSTEXPR14 +day(const etl::chrono::day& other) +ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +## Tests +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the day is within the valid range. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +int compare(const etl::chrono::day& other) const +ETL_NOEXCEPT +``` +**Description** +Compare `day` with another. +if `day < other`, returns `-1` +else if `day > other`, returns `1` +else returns `0` + +## Assignment +```cpp +ETL_CONSTEXPR14 +etl::chrono::day& operator =(const etl::chrono::day& rhs) +ETL_NOEXCEPT +``` +**Description** +Assignment operator + +## Increment/decrement +```cpp +ETL_CONSTEXPR14 +etl::chrono::day& operator ++() +ETL_NOEXCEPT +``` +**Description** +Pre-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::day operator ++(int) +ETL_NOEXCEPT +``` +**Description** +Post-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::day& operator --() +ETL_NOEXCEPT +``` +**Description** +Pre-decrement operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::day operator --(int) +ETL_NOEXCEPT +``` +**Description** +Post-decrement operator. + +## Mathematical operators +```cpp +ETL_CONSTEXPR14 +etl::chrono::day& operator +=(const etl::chrono::days& ms) +ETL_NOEXCEPT +``` +**Description** +Plus-equals operator adding etl::chrono::days. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::day& operator -=(const etl::chrono::days& ms) +ETL_NOEXCEPT +``` +**Description** +Minus-equals operator subtracting `etl::chrono::days`. + +## Conversion +```cpp +ETL_CONSTEXPR14 +operator unsigned() const +ETL_NOEXCEPT +``` +**Description** +Conversion operator to unsigned int. + +## Non-member mathematical operators +```cpp +ETL_CONSTEXPR14 +etl::chrono::day operator +(const etl::chrono::day& m, + const etl::chrono::days& ms) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::days` to `etl::chrono::day`. + +**Return** +`etl::chrono::day.` + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::day operator +(const etl::chrono::days& ms, + const etl::chrono::day& m) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::day` to `etl::chrono::days`. + +**Return** +`etl::chrono::day`. + +--- +```cpp +ETL_CONSTEXPR14 +etl::chrono::day operator -(const etl::chrono::day& m, + const etl::chrono::days& ms) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::days` from `etl::chrono::day`. + +**Return** +`etl::chrono::day`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::day operator -(const etl::chrono::days& ms, + const etl::chrono::day& m) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::day` from `etl::chrono::days`. + +**Return** +`etl::chrono::days`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::days operator -(const etl::chrono::day& m1, + const etl::chrono::day& m2) ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::day` from `etl::chrono::day`. + +**Return** +`etl::chrono::days`. + +## Non-member comparison operators +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::day& m1, + const etl::chrono::day& m2) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::day& m1, + const etl::chrono::day& m2) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::day& m1, + const etl::chrono::day& m2) +ETL_NOEXCEPT +``` +**Description** +Less-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::day& m1, + const etl::chrono::day& m2) +ETL_NOEXCEPT +``` +**Description** +Less-than-or-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >(const etl::chrono::day& m1, + const etl::chrono::day& m2) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >=(const etl::chrono::day& m1, + const etl::chrono::day& m2) +ETL_NOEXCEPT +``` +**Description** +Greater-than-or-equal operator. + +--- + +```cpp +[[nodiscard]] inline constexpr +auto operator <=>(const etl::chrono::day& m1, + const etl::chrono::day& m2) +noexcept +``` +**Description** +Spaceship operator. +C++20 + +## Defined days + +```cpp +etl::chrono::January +etl::chrono::February +etl::chrono::March +etl::chrono::April +etl::chrono::May +etl::chrono::June +etl::chrono::July +etl::chrono::August +etl::chrono::September +etl::chrono::October +etl::chrono::November +etl::chrono::December +``` + +## Hash + +```cpp +template <> +struct hash +``` +**Description** +Hash function for `etl::chrono::day`. + diff --git a/docs/chrono/duration/_index.md b/docs/chrono/duration/_index.md new file mode 100644 index 00000000..f41bb632 --- /dev/null +++ b/docs/chrono/duration/_index.md @@ -0,0 +1,16 @@ +--- +title: "Durations" +weight: 100 +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono](https://en.cppreference.com/w/cpp/chrono.html) +{{< /callout >}} + +Classes that represent a duration. + +`etl::chrono::duration` +`etl::chrono::duration_cast` +`etl::chrono::duration_values` diff --git a/docs/chrono/duration/duration.md b/docs/chrono/duration/duration.md new file mode 100644 index 00000000..c75c6a7b --- /dev/null +++ b/docs/chrono/duration/duration.md @@ -0,0 +1,526 @@ +--- +title: "duration" +--- + +{{< callout type="info">}} + Header: `chrono.h` + Since: `TBC` + Similar to: [std::chrono::duration](https://en.cppreference.com/w/cpp/chrono/duration.html) + Similar to: [std::chrono::duration_values](https://en.cppreference.com/w/cpp/chrono/duration_values.html) +{{< /callout >}} + +Templates representing a time interval. + +## duration_values +```cpp +template +struct duration_values +``` +```cpp +ETL_NODISCARD static ETL_CONSTEXPR TRep zero() ETL_NOEXCEPT +``` +**Return** +`TRep(0)` + +--- + +```cpp +ETL_NODISCARD static ETL_CONSTEXPR14 TRep min() ETL_NOEXCEPT +``` +**Return** +`etl::numeric_limits::min()` + +--- + +```cpp +ETL_NODISCARD static ETL_CONSTEXPR14 TRep max() ETL_NOEXCEPT +``` +**Returns** +`etl::numeric_limits::max()` + +## duration +```cpp +template > +class duration +``` +```cpp +using rep = TRep +using period = typename TPeriod::type; +``` + +### Construction +```cpp +ETL_CONSTEXPR +duration() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +duration(const etl::chrono::duration& other) +ETL_NOEXCEPT +``` +--- + +```cpp +template +ETL_CONSTEXPR14 +explicit duration(const TRep2& value) +ETL_NOEXCEPT +``` + +--- + +```cpp +template +ETL_CONSTEXPR14 +duration(const etl::chrono::duration& other) +ETL_NOEXCEPT +``` +**Description** +Construct from another duration type. +Enabled if `etl::ratio_divide::den == 1` + +### Tests +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +int compare(const time_point& other) const +ETL_NOEXCEPT +``` +**Description** +Compare day with another. +if `time_point < other`, returns `-1` +else if `time_point > other`, returns `1` +else returns `0` + +### Assignment +```cpp +ETL_CONSTEXPR14 +etl::chrono::duration operator =(const etl::chrono::duration& other) ETL_NOEXCEPT +``` + +--- + +```cpp +template +ETL_CONSTEXPR14 +etl::chrono::duration operator =(const etl::chrono::duration& other) ETL_NOEXCEPT +``` + +### Convertion +```cpp +ETL_CONSTEXPR14 +TRep count() const +ETL_NOEXCEPT +``` +**Return** +The duration count as a numeric. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::common_type_t operator +() const +ETL_NOEXCEPT +``` +**Description** +Implements unary plus. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::common_type_t operator -() const +ETL_NOEXCEPT +``` +**Description** +Implements unary minus. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::duration absolute() const +ETL_NOEXCEPT +``` +**Return** +The absolute value of the duration. + +--- + +### Constants +```cpp +ETL_NODISCARD +static ETL_CONSTEXPR14 etl::chrono::duration zero() +ETL_NOEXCEPT +``` +**Return** +The duration zero value. + +--- + +```cpp +ETL_NODISCARD +static ETL_CONSTEXPR14 etl::chrono::duration min() +ETL_NOEXCEPT +``` +**Return** +The minimum duration value. + +--- + +```cpp +ETL_NODISCARD +static ETL_CONSTEXPR14 etl::chrono::duration max() +ETL_NOEXCEPT +--- +**Return** +The maximum duration value. + +## Increment/decrement +```cpp +ETL_CONSTEXPR14 +duration& operator ++() +ETL_NOEXCEPT +``` +**Description** +Pre-increments the duration count. + +--- + +```cpp +ETL_CONSTEXPR14 +duration operator ++(int) +ETL_NOEXCEPT +``` +**Description** +Post-increments the duration count. + +--- + +```cpp +ETL_CONSTEXPR14 +duration& operator --() +ETL_NOEXCEPT +``` +**Description** +Pre-decrements the duration count. + +--- +```cpp +ETL_CONSTEXPR14 +duration operator --(int) +ETL_NOEXCEPT +``` +**Description** +Post-decrements the duration count. + +### Mathematical operators +```cpp +ETL_CONSTEXPR14 +duration& operator +=(const duration& d) +ETL_NOEXCEPT +``` +**Description** +Adds duration `d` to this duration. + +--- + +```cpp +ETL_CONSTEXPR14 +duration& operator -=(const duration& d) +ETL_NOEXCEPT +``` +**Description** +Subtracts duration `d` to this duration. + +--- +```cpp +ETL_CONSTEXPR14 +duration& operator *=(const TRep& r) +ETL_NOEXCEPT +``` +**Description** +Multiplies this duration by `r`. + +--- + +```cpp +ETL_CONSTEXPR14 +duration& operator /=(const TRep& r) +ETL_NOEXCEPT +``` +**Description** +Divides this duration by `r`. + +--- + +```cpp +ETL_CONSTEXPR14 +duration& operator %=(const TRep& r) +ETL_NOEXCEPT +``` +**Description** +Sets this duration to the modulus of `r`. + +--- + +```cpp +ETL_CONSTEXPR14 +duration& operator %=(const duration& d) +ETL_NOEXCEPT +``` +**Description** +Sets this duration to the modulus of duration `d`. + +### Comparison +```cpp +template +ETL_CONSTEXPR14 +int compare(const duration& other) const +ETL_NOEXCEPT +``` +**Description** +Compare duration with another. +If `duration < other`, returns `-1` +else if `duration > other`, returns `1` +else returns `0` + +### Non-member mathematical operators +```cpp +template +ETL_CONSTEXPR14 +etl::common_type_t, + etl::chrono::duration> +operator +(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `+` + +--- + +```cpp +template +ETL_CONSTEXPR14 +etl::common_type_t, + etl::chrono::duration >::type +operator -(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `-` + +--- + +```cpp +template +ETL_CONSTEXPR14 +etl::chrono::duration, TPeriod1>> +operator *(const etl::chrono::duration& lhs, + const TRep2& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `*` +Enabled if `TRep2` is not a specialization of `etl::chrono::duration`. + +--- + +```cpp +template +ETL_CONSTEXPR14 +etl::chrono::duration, TPeriod2> +operator *(const TRep1& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `*` + +--- + +```cpp +template +ETL_CONSTEXPR14 +etl::common_type_t, TPeriod1> +operator /(const etl::chrono::duration& lhs, + const TRep2& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `/` +Enabled if `TRep2` is not a specialization of `etl::chrono::duration`. + +--- + +```cpp +template +ETL_CONSTEXPR14 +etl::common_type_t +operator /(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `/` + +--- + +```cpp +template +ETL_CONSTEXPR14 +etl::chrono::duration, TPeriod1> +operator %(const etl::chrono::duration& lhs, + const TRep2& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `%` + +``` + +```cpp +template +ETL_CONSTEXPR14 +etl::common_type_t, + etl::chrono::duration> +operator %(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Operator `%` + +### Non-member comparison operators +```cpp +template +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Checks for equality. + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Checks for inequality. + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Checks for less-than. + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Checks for less-than-or-equal. + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator >(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Checks for greater-than. + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator >=(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Checks for greater-than-or-equal. + +--- + +```cpp +template +[[nodiscard]] +constexpr +auto operator <=>(const etl::chrono::duration& lhs, + const etl::chrono::duration& rhs) +noexcept +``` +**Description** +Spaceship operator. +C++20 + +## common_type + +```cpp +template +struct common_type, etl::chrono::duration> +``` +**Description** +`etl::common_type` specialisation for `etl::duration`. + +## Hash +```cpp +template +struct hash> +``` + +## Pre-defined duration types + +```cpp +etl::chrono::years +etl::chrono::months +etl::chrono::weeks +etl::chrono::days +etl::chrono::hours +etl::chrono::minutes +etl::chrono::seconds +etl::chrono::milliseconds +etl::chrono::microseconds +etl::chrono::nanoseconds +``` + +## duration_cast +```cpp +template +ETL_CONSTEXPR14 +TToDuration duration_cast(const etl::chrono::duration& d) +ETL_NOEXCEPT +``` +**Description** +Converts from one duration type to another. diff --git a/docs/chrono/duration/duration_cast.md b/docs/chrono/duration/duration_cast.md new file mode 100644 index 00000000..c75f1166 --- /dev/null +++ b/docs/chrono/duration/duration_cast.md @@ -0,0 +1,21 @@ +--- +title: "duration_cast" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::duration_cast](https://en.cppreference.com/w/cpp/chrono/duration/duration_cast.html) +{{< /callout >}} + +Templates representing a time interval. + +## duration_cast +```cpp +template +ETL_CONSTEXPR14 +TToDuration duration_cast(const etl::chrono::duration& d) +ETL_NOEXCEPT +``` +**Description** +Converts from one duration type to another. diff --git a/docs/chrono/duration/duration_values.md b/docs/chrono/duration/duration_values.md new file mode 100644 index 00000000..1373458e --- /dev/null +++ b/docs/chrono/duration/duration_values.md @@ -0,0 +1,38 @@ +--- +title: "duration_values" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::duration_values](https://en.cppreference.com/w/cpp/chrono/duration_values.html) +{{< /callout >}} + +Templates representing a time interval. + +## duration_values +```cpp +template +struct duration_values +``` +```cpp +ETL_NODISCARD static ETL_CONSTEXPR TRep zero() ETL_NOEXCEPT +``` +**Return** +`TRep(0)` + +--- + +```cpp +ETL_NODISCARD static ETL_CONSTEXPR14 TRep min() ETL_NOEXCEPT +``` +**Return** +`etl::numeric_limits::min()` + +--- + +```cpp +ETL_NODISCARD static ETL_CONSTEXPR14 TRep max() ETL_NOEXCEPT +``` +**Returns** +`etl::numeric_limits::max()` diff --git a/docs/chrono/hh_mm_ss.md b/docs/chrono/hh_mm_ss.md new file mode 100644 index 00000000..f7744ff1 --- /dev/null +++ b/docs/chrono/hh_mm_ss.md @@ -0,0 +1,138 @@ +--- +title: "hh_mm_ss" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::hh_mm_ss](https://en.cppreference.com/w/cpp/chrono/hh_mm_ss.html) +{{< /callout >}} + +A type to hold hours, minutes, and seconds. + +```cpp +template +class hh_mm_ss +``` +**Description** +Static asserts if `TDuration` is not a specialisation of `etl::chrono::duration`. + + +## Constants +```cpp +static constexpr int fractional_width; +``` +**Description** +The number of fractional digits. + +## Member types +```cpp +precision +``` +**Description** +The return type for `to_duration`. + +## Constructors +```cpp +ETL_CONSTEXPR +hh_mm_ss() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +explicit hh_mm_ss(TDuration d) +ETL_NOEXCEPT +``` +**Description** +Construct from `duration`. + +## Access +```pp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool is_negative() const +ETL_NOEXCEPT +``` +**Description** +Checks for negative duration. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::hours hours() const +ETL_NOEXCEPT +``` +**Return** +The hours. + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::minutes minutes() const +ETL_NOEXCEPT +``` +**Return** +The minutes. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::seconds seconds() const +ETL_NOEXCEPT +``` +**Return** +The seconds. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +precision subseconds() const +ETL_NOEXCEPT +``` +**Return** +The subseconds. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +explicit operator precision() const +ETL_NOEXCEPT +``` +**Return** +The duration. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +precision to_duration() const +ETL_NOEXCEPT +``` +**Return*** +The duration. + +## absolute +```cpp +template +ETL_NODISCARD +ETL_CONSTEXPR14 +TDuration absolute(TDuration dur) +ETL_NOEXCEPT +``` +A specialisation of absolute for `etl::chrono::duration`. +**Return** +The absolute duration value. \ No newline at end of file diff --git a/docs/chrono/last_spec.md b/docs/chrono/last_spec.md new file mode 100644 index 00000000..cc6d2a2b --- /dev/null +++ b/docs/chrono/last_spec.md @@ -0,0 +1,25 @@ +--- +title: "last_spec" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::last_spec](https://en.cppreference.com/w/cpp/chrono/last_spec.html) +{{< /callout >}} + +`last_spec` is a tag type that is used in conjunction with other calendar types to indicate the last thing in a sequence. + +```cpp +struct last_spec +{ + explicit last_spec() = default; +}; + +inline constexpr last_spec last{}; +``` + +**Example** + +`2025_y/March/last` for last day of March 2025 i.e. 2025-03-31 + diff --git a/docs/chrono/month/_index.md b/docs/chrono/month/_index.md new file mode 100644 index 00000000..d62bb8c3 --- /dev/null +++ b/docs/chrono/month/_index.md @@ -0,0 +1,18 @@ +--- +title: "Months" +weight: 100 +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono](https://en.cppreference.com/w/cpp/chrono.html) +{{< /callout >}} + +Classes that represent months. + +`etl::chrono::month` +`etl::chrono::month_day` +`etl::chrono::month_day_last` +`etl::chrono::month_weekday` +`etl::chrono::month_weekday_last` diff --git a/docs/chrono/month/month.md b/docs/chrono/month/month.md new file mode 100644 index 00000000..1099622b --- /dev/null +++ b/docs/chrono/month/month.md @@ -0,0 +1,337 @@ +--- +title: "month" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::month](https://en.cppreference.com/w/cpp/chrono/month.html) +{{< /callout >}} + +A class representing a month. + +```cpp +class month +``` +## Member types +`rep` The internal representation. + +## Construction +```cpp +ETL_CONSTEXPR +month() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR +explicit month(unsigned value) +ETL_NOEXCEPT +``` +**Description** +Construct from unsigned. + +--- + +```cpp +ETL_CONSTEXPR14 +month(const etl::chrono::month& other) +ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Description** +Returns true if the month is in range. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +int compare(const etl::chrono::month& other) const +ETL_NOEXCEPT +``` +**Description** +Compare month with another. +if month < other, returns -1 +else if month > other, returns 1 +else returns 0 + +## Assignment +```cpp +ETL_CONSTEXPR14 +etl::chrono::month& operator =(const etl::chrono::month& rhs) +ETL_NOEXCEPT +``` +**Description** +Assignment operator + +## Increment / decrement + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month& operator ++() +ETL_NOEXCEPT +``` +**Description** +Pre-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month operator ++(int) +ETL_NOEXCEPT +``` +**Description** +Post-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month& operator --() +ETL_NOEXCEPT +``` +**Description** +Pre-decrement operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month operator --(int) +ETL_NOEXCEPT +``` +**Description** +Post-decrement operator. + +## Mathematical operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month& operator +=(const etl::chrono::months& ms) +ETL_NOEXCEPT +``` +**Description** +Plus-equals operator adding `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month& operator -=(const etl::chrono::months& ms) +ETL_NOEXCEPT +``` +**Description** +Minus-equals operator subtracting `etl::chrono::months`. + +## Constants + +```cpp +ETL_NODISCARD +static +ETL_CONSTEXPR14 +etl::chrono::month min() +ETL_NOEXCEPT +``` +**Description** +The minimum month value for which ok() will return true. + +--- + +```cpp +ETL_NODISCARD +static +ETL_CONSTEXPR14 +etl::chrono::month max() +ETL_NOEXCEPT +``` +**Description** +The maximum month value for which ok() will return true. + +## Conversion + +```cpp +ETL_CONSTEXPR14 +operator unsigned() const +ETL_NOEXCEPT +``` +**Description** +Conversion operator to `unsigned int`. + +## Non-member mathematical operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month operator +(const etl::chrono::month& m, + const etl::chrono::months& ms) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::months` to `etl::chrono::month`. +**Return** +`etl::chrono::month.` + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month operator +(const etl::chrono::months& ms, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::month` to `etl::chrono::months`. +**Return** +`etl::chrono::month`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month operator -(const etl::chrono::month& m, + const etl::chrono::months& ms) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::months` from `etl::chrono::month`. +**Return** +`etl::chrono::month`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month operator -(const etl::chrono::months& ms, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::month` from `etl::chrono::months`. +**Return** +`etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::months operator -(const etl::chrono::month& m1, + const etl::chrono::month& m2) ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::month` from `etl::chrono::month`. +**Return** +`etl::chrono::months`. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::month& m1, + const etl::chrono::month& m2) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::month& m1, + const etl::chrono::month& m2) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month& m1, + const etl::chrono::month& m2) +ETL_NOEXCEPT +``` +**Description** +Less-than operator. + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month& m1, + const etl::chrono::month& m2) +ETL_NOEXCEPT +``` +**Description** +Less-than-or-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >(const etl::chrono::month& m1, + const etl::chrono::month& m2) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >=(const etl::chrono::month& m1, + const etl::chrono::month& m2) +ETL_NOEXCEPT +``` +**Description** +Greater-than-or-equal operator. + +--- + +```cpp +[[nodiscard]] inline constexpr +auto operator <=>(const etl::chrono::month& m1, + const etl::chrono::month& m2) +noexcept +``` +**Description** +Spaceship operator. +C++20 + +## Defined months +```cpp +etl::chrono::January +etl::chrono::February +etl::chrono::March +etl::chrono::April +etl::chrono::May +etl::chrono::June +etl::chrono::July +etl::chrono::August +etl::chrono::September +etl::chrono::October +etl::chrono::November +etl::chrono::December +``` +## Hash +```cpp +template <> +struct hash +``` +Hash function for `etl::chrono::month`. + diff --git a/docs/chrono/month/month_day.md b/docs/chrono/month/month_day.md new file mode 100644 index 00000000..bf7b0002 --- /dev/null +++ b/docs/chrono/month/month_day.md @@ -0,0 +1,171 @@ +--- +title: "month_day" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::month_day](https://en.cppreference.com/w/cpp/chrono/month_day.html) +{{< /callout >}} + +A class representing a month and day. + +```cpp +class month_day +``` + +## Construction + +```cpp +ETL_CONSTEXPR +month_day() +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +month_day(const etl::chrono::month& m, + const etl::chrono::day& d) +ETL_NOEXCEPT +``` +**Description** +Construct from `month` and `day`. + +## Access + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month month() const +ETL_NOEXCEPT +``` +**Return** +The month. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::day day() const +ETL_NOEXCEPT +``` +**Return** +The day. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the month and day is within the valid limits. + +--- + +```cpp +ETL_CONSTEXPR14 +int compare(const month_day& other) const +ETL_NOEXCEPT +``` +**Description** +Compare `month_day` with another. +if `month < other.month`, returns `-1` +else if `month > other.month`, returns `1` +else if `day < other.day`, returns `-1` +else if `day > other.day`, returns `1` +else returns `0` + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::month_day& lhs, + const etl::chrono::month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::month_day& lhs, + const etl::chrono::month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month_day& lhs, + const etl::chrono::month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month_day& lhs, + const etl::chrono::month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >(const etl::chrono::month_day& lhs, + const etl::chrono::month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >=(const etl::chrono::month_day& lhs, + const etl::chrono::month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than-equal operator. + +--- + +```cpp +[[nodiscard]] constexpr +auto operator <=>(const etl::chrono::month_day& lhs, + const etl::chrono::month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Spaceship operator. +C++20 + +## Hash + +```cpp +template +struct hash +``` +**Description** +Hash function for `etl::chrono::month_day`. + diff --git a/docs/chrono/month/month_day_last.md b/docs/chrono/month/month_day_last.md new file mode 100644 index 00000000..32733195 --- /dev/null +++ b/docs/chrono/month/month_day_last.md @@ -0,0 +1,147 @@ +--- +title: "month_day_last" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::month_day_last](https://en.cppreference.com/w/cpp/chrono/month_day_last.html) +{{< /callout >}} + +A class representing a month and last day. + +```cpp +class month_day_last +``` + +## Construction + +```cpp +ETL_CONSTEXPR14 +explicit month_day_last(const etl::chrono::month& m) +ETL_NOEXCEPT +``` +**Description** +Construct from month. + +## Access + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month month() const +ETL_NOEXCEPT +``` +**Return** +The month. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the month is within the valid limits. + +--- + +```cpp +ETL_CONSTEXPR14 +int compare(const month_day_last& other) const +ETL_NOEXCEPT +``` +**Description** +Compare `month_day_last` with another. +if `month < other.month`, returns `-1` +else if `month > other.month`, returns `1` +else returns `0` + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::month_day_last& lhs, + const etl::chrono::month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::month_day_last& lhs, + const etl::chrono::month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month_day_last& lhs, + const etl::chrono::month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month_day_last& lhs, + const etl::chrono::month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month_day_last& lhs, + const etl::chrono::month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month_day_last& lhs, + const etl::chrono::month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than-equal operator. + +--- + +```cpp +[[nodiscard]] constexpr +auto operator <=>(const etl::chrono::month_day_last& lhs, + const etl::chrono::month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Spaceship operator. +C++20 + +## Hash + +```cpp +template +struct hash +``` +**Description** +Hash function for `etl::chrono::month_day_last`. diff --git a/docs/chrono/month/month_weekday.md b/docs/chrono/month/month_weekday.md new file mode 100644 index 00000000..ab73505e --- /dev/null +++ b/docs/chrono/month/month_weekday.md @@ -0,0 +1,156 @@ +--- +title: "month_weekday" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::month_weekday](https://en.cppreference.com/w/cpp/chrono/month_weekday.html) +{{< /callout >}} + +A class representing a month and weekday. + +```cpp +class month_weekday +``` + +## Construction + +```cpp +ETL_CONSTEXPR +month_weekday() +``` +**Decription** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +month_weekday(const etl::chrono::month& m, + const etl::chrono::weekday_indexed& wd) +ETL_NOEXCEPT +``` +**Decription** +Construct from month and weekday_indexed. + +## Access + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month month() const +ETL_NOEXCEPT +``` +**Returns** +The month. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::weekday_indexed weekday_indexed() const +ETL_NOEXCEPT +``` +**Return** +The weekday. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the month and day is within the valid limits. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::month_weekday& lhs, + const etl::chrono::month_weekday& rhs) +ETL_NOEXCEPT +``` +**Decription** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::month_weekday& lhs, + const etl::chrono::month_weekday& rhs) +ETL_NOEXCEPT +``` +**Decription** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month_weekday& lhs, + const etl::chrono::month_weekday& rhs) +ETL_NOEXCEPT +``` +**Decription** +Less-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month_weekday& lhs, + const etl::chrono::month_weekday& rhs) +ETL_NOEXCEPT +``` +**Decription** +Less-than-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month_weekday& lhs, + const etl::chrono::month_weekday& rhs) +ETL_NOEXCEPT +``` +**Decription** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month_weekday& lhs, + const etl::chrono::month_weekday& rhs) +ETL_NOEXCEPT +``` +**Decription** +Greater-than-equal operator. + +--- + +```cpp +[[nodiscard]] constexpr +auto operator <=>(const etl::chrono::month_weekday& lhs, + const etl::chrono::month_weekday& rhs) +ETL_NOEXCEPT +``` +**Decription** +Spaceship operator. +C++20 + +## Hash + +```cpp +template +struct hash +``` +**Decription** +Hash function for `etl::chrono::month_weekday`. + diff --git a/docs/chrono/month/month_weekday_last.md b/docs/chrono/month/month_weekday_last.md new file mode 100644 index 00000000..4af59d1d --- /dev/null +++ b/docs/chrono/month/month_weekday_last.md @@ -0,0 +1,143 @@ +--- +title: "month_weekday_last" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::month_weekday_last](https://en.cppreference.com/w/cpp/chrono/month_weekday_last.html) +{{< /callout >}} + +A class representing a month and weekday_last. + +```cpp +class month_weekday_last +``` + +## Construction + +```cpp +ETL_CONSTEXPR +month_weekday_last() +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +month_weekday_last(const etl::chrono::month& m, + const etl::chrono::weekday_last& wd) +ETL_NOEXCEPT +``` +**Description** +Construct from `month` and `weekday_last`. + +## Access + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month month() const +ETL_NOEXCEPT +``` +**Return** +The month. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::weekday_last weekday_last() const +ETL_NOEXCEPT +``` +**Return** +The weekday. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the month and day is within the valid limits. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::month_weekday_last& lhs, + const etl::chrono::month_weekday_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::month_weekday_last& lhs, + const etl::chrono::month_weekday_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month_weekday_last& lhs, + const etl::chrono::month_weekday_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month_weekday_last& lhs, + const etl::chrono::month_weekday_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::month_weekday_last& lhs, + const etl::chrono::month_weekday_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::month_weekday_last& lhs, + const etl::chrono::month_weekday_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than-equal operator. + +## Hash + +```cpp +template +struct hash +``` +**Description** +Hash function for `etl::chrono::month_weekday_last`. diff --git a/docs/chrono/operators.md b/docs/chrono/operators.md new file mode 100644 index 00000000..719afea0 --- /dev/null +++ b/docs/chrono/operators.md @@ -0,0 +1,329 @@ +--- +title: "Operators" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::operator /](https://en.cppreference.com/w/cpp/chrono/operator_slash.html) +{{< /callout >}} + +Operators for building dates. + +## month_day + +Create from month and day. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day operator /(const etl::chrono::month& m, + const etl::chrono::day& d) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day operator /(const etl::chrono::month& m, + int d) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day operator /(int m, + const etl::chrono::day& d) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day operator /(const etl::chrono::day& d, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day operator /(const etl::chrono::day& d, + int m) +ETL_NOEXCEPT +``` + +## month_day_last + +Create from month and last_spec. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day_last operator /(const etl::chrono::month& m, + etl::chrono::last_spec) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day_last operator /(int m, + etl::chrono::last_spec) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day_last operator /(etl::chrono::last_spec, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_day_last operator /(etl::chrono::last_spec, + int m) +ETL_NOEXCEPT +``` + +## month_weekday + +Create from month and weekday. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday operator /(const etl::chrono::month& m, + const etl::chrono::weekday_indexed& wdi) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday operator /(int m, + const etl::chrono::weekday_indexed& wdi) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday operator /(const etl::chrono::weekday_indexed& wdi, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday operator /(const etl::chrono::weekday_indexed& wdi, + int m) +ETL_NOEXCEPT +``` + +## month_weekday_last + +Create from month and weekday_last. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday_last operator /(const etl::chrono::month& m, + const etl::chrono::weekday_last& wdl) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday_last operator /(int m, + const etl::chrono::weekday_last& wdl) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday_last operator /(const etl::chrono::weekday_last& wdl, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::month_weekday_last operator /(const etl::chrono::weekday_last& wdl, + int m) +ETL_NOEXCEPT +``` + +## year_month + +Create from year and month. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator /(const etl::chrono::year& y, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator /(const etl::chrono::year& y, + int m) +ETL_NOEXCEPT +``` + +## year_month_day + +Create from year, month, and day. + +```cpp +ETL_CONSTEXPR14 etl::chrono::year_month_day operator /(const etl::chrono::year_month& ym, + const etl::chrono::day& d) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 etl::chrono::year_month_day operator /(const etl::chrono::year_month& ym, + int d ) +ETL_NOEXCEPT +``` + +## year_month_day + +Create from year and month_day. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day operator /(const etl::chrono::year& y, + const etl::chrono::month_day& md) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day operator /(int y, + const etl::chrono::month_day& md) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day operator /(const etl::chrono::month_day& md, + const etl::chrono::year& y) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day operator /(const etl::chrono::month_day& md, + int y) +ETL_NOEXCEPT +``` + +## year_month_day_last + +Create from year_month and last_spec. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator /(const etl::chrono::year_month& ym, + etl::chrono::last_spec) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator /(const etl::chrono::year& y, + const etl::chrono::month_day_last& mdl) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator /(int y, + const etl::chrono::month_day_last& mdl) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator /(const etl::chrono::month_day_last& mdl, + const etl::chrono::year& y) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator /(const etl::chrono::month_day_last& mdl, + int y) +ETL_NOEXCEPT +``` + +## year_month_weekday + +Create from year_month and weekday. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday operator /(const etl::chrono::year_month& ym, + const etl::chrono::weekday_indexed& wdi) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday operator /(const etl::chrono::year& y, + const etl::chrono::month_weekday& mwd) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday operator /(int y, + const etl::chrono::month_weekday& mwd) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday operator /(const etl::chrono::month_weekday& mwd, + const etl::chrono::year& y) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday operator /(const etl::chrono::month_weekday& mwd, + int y) +ETL_NOEXCEPT +``` + +## year_month_weekday_last + +Create from year_month and weekday_last. + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday_last operator /(const etl::chrono::year_month& ym, + const etl::chrono::weekday_last& wdl) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday_last operator /(const etl::chrono::year& y, + const etl::chrono::month_weekday_last& mwdl) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday_last operator /(int y, + const etl::chrono::month_weekday_last& mwdl) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday_last operator /(const etl::chrono::month_weekday_last& mwdl, + const etl::chrono::year& y) +ETL_NOEXCEPT +``` + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_weekday_last operator /(const etl::chrono::month_weekday_last& mwdl, + int y) +ETL_NOEXCEPT +``` diff --git a/docs/chrono/time_point.md b/docs/chrono/time_point.md new file mode 100644 index 00000000..dd0bd674 --- /dev/null +++ b/docs/chrono/time_point.md @@ -0,0 +1,273 @@ +--- +title: "time_point" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::time_point](https://en.cppreference.com/w/cpp/chrono/time_point.html) +{{< /callout >}} + +```cpp +template +class time_point; +``` +Represents a point in time storing a `TDuration` indicating the time +interval from the start of the `TClock`'s epoch. + +## Member types + +```cpp +using clock = TClock +using duration = TDuration +using rep = typename TDuration::rep +using period = typename TDuration::period +``` + +## Constructors + +```cpp +ETL_CONSTEXPR +time_point() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +explicit time_point(const duration& dur_) +ETL_NOEXCEPT +``` +**Description** +Construct from a duration. + +--- + +```cpp +ETL_CONSTEXPR14 +time_point(const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +--- + +```cpp +template +ETL_CONSTEXPR14 +explicit time_point(const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Copy construct from another time_point with a different duration type. + +## Assignment +```cpp +ETL_CONSTEXPR14 +time_point& operator =(const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Assignment operator. + +## Access +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 duration time_since_epoch() const +ETL_NOEXCEPT +``` +**Return** +A duration representing the amount of time between this and the clock's epoch. + +## Member arithmetic operators +```cpp +ETL_CONSTEXPR14 time_point& operator +=(const duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Adds a duration. + +--- + +```cpp +ETL_CONSTEXPR14 time_point& operator -=(const duration& rhs) +ETL_NOEXCEPT +``` +**Description** +Subtracts a duration. + +## Constants +```cpp +ETL_NODISCARD +static ETL_CONSTEXPR14 time_point min() +ETL_NOEXCEPT +``` +**Return** +A time_point with the smallest possible duration. + +--- + +```cpp +ETL_NODISCARD +static ETL_CONSTEXPR14 time_point max() +ETL_NOEXCEPT +``` +**Return** +A time_point with the largest possible duration. + +## Rounding +```cpp +template +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::time_point + floor(const etl::chrono::time_point& tp) +ETL_NOEXCEPT +``` +**Description** +Rounds down a duration to the nearest lower precision. + +--- + +```cpp +template +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::time_point + ceil(const etl::chrono::time_point& tp) +ETL_NOEXCEPT +``` +**Description** +Rounds up a duration to the nearest higher precision. + +--- + +```cpp +template +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::time_point + round(const etl::chrono::time_point& tp) +ETL_NOEXCEPT +``` +**Description** +Rounds a duration to the nearest precision. +If the duration is exactly halfway, it rounds away from zero. + +## Casting +```cpp +template +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::time_point + time_point_cast(const etl::chrono::time_point& tp) +ETL_NOEXCEPT +``` + +## Comparison +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 int compare(const time_point& other) const +ETL_NOEXCEPT +``` +**Description** +Compare day with another. +If time_point < other, returns -1 +else if time_point > other, returns 1 +else returns 0 + +## Non-member comparison operators +```cpp +template +ETL_CONSTEXPR14 +bool operator ==(const time_point& lhs, + const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Equality operator + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator !=(const time_point& lhs, + const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Inequality operator + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator <(const time_point& lhs, + const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than operator + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator <=(const time_point& lhs, + const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Less-than-equal operator + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator >(const time_point& lhs, + const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator + +--- + +```cpp +template +ETL_CONSTEXPR14 +bool operator >=(const time_point& lhs, + const time_point& rhs) +ETL_NOEXCEPT +``` +**Description** +Greater-than-equal operator + +--- + +```cpp +template +[[nodiscard]] constexpr auto operator <=>(const etl::chrono::time_point& lhs, + const etl::chrono::time_point& rhs) +noexcept +``` +**Description** +Spaceship operator +C++20 + +## etl::common_type specialisation +```cpp +template +struct common_type, + etl::chrono::time_point> +``` +**Description** +Defines type, which is the common type of two `etl::chrono::time_point`. diff --git a/docs/chrono/weekday/_index.md b/docs/chrono/weekday/_index.md new file mode 100644 index 00000000..ef7a2c81 --- /dev/null +++ b/docs/chrono/weekday/_index.md @@ -0,0 +1,16 @@ +--- +title: "Weekdays" +weight: 100 +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono](https://en.cppreference.com/w/cpp/chrono.html) +{{< /callout >}} + +Classes that represent weekdays. + +`etl::chrono::weekday` +`etl::chrono::weekday_indexed` +`etl::chrono::weekday_last` diff --git a/docs/chrono/weekday/weekday.md b/docs/chrono/weekday/weekday.md new file mode 100644 index 00000000..70cf2e06 --- /dev/null +++ b/docs/chrono/weekday/weekday.md @@ -0,0 +1,386 @@ +--- +title: "weekday" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::weekday](https://en.cppreference.com/w/cpp/chrono/weekday.html) +{{< /callout >}} + +A class representing a weekday. + +```cpp +class weekday +``` + +## Construction + +```cpp +ETL_CONSTEXPR +weekday() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR +explicit weekday(unsigned value) +ETL_NOEXCEPT +``` +**Description** +Construct from `unsigned`. + +--- + +```cpp +ETL_CONSTEXPR14 +weekday(const etl::chrono::sys_days& sd) +ETL_NOEXCEPT +``` +**Description** +Construct from `sys_days`. + +--- + +```cpp +ETL_CONSTEXPR14 +weekday(const etl::chrono::local_days& sd) +ETL_NOEXCEPT +``` +**Description** +Construct from `local_days`. + +--- + +```cpp +ETL_CONSTEXPR14 +weekday(const etl::chrono::weekday& other) +ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the weekday is valid + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool is_weekend() const +ETL_NOEXCEPT +``` +**Return** +`true` if the weekday is a Saturday or Sunday. + +## Assignment + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday& operator =(const etl::chrono::weekday& rhs) +ETL_NOEXCEPT +``` +**Description** +Assignment operator + +## Access + +```cpp +ETL_CONSTEXPR14 +int c_encoding() const +ETL_NOEXCEPT +``` +**Description** +Gets the value of the weekday using C encoding. + +--- + +```cpp +ETL_CONSTEXPR14 +int iso_encoding() const +ETL_NOEXCEPT +``` +**Description** +Gets the value of the weekday using ISO encoding. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::weekday_indexed operator[](unsigned index) const +ETL_NOEXCEPT +``` +**Description** +Index operator, from index. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::weekday_last operator[](etl::chrono::last_spec last) const +ETL_NOEXCEPT +``` +**Description** +Index operator, from `etl::chrono::last_spec`. + +## Increment/decrement + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday& operator ++() +ETL_NOEXCEPT +``` +**Description** +Pre-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday operator ++(int) +ETL_NOEXCEPT +``` +**Description** +Post-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday& operator --() +ETL_NOEXCEPT +``` +**Description** +Pre-decrement operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday operator --(int) +ETL_NOEXCEPT +``` +**Description** +Post-decrement operator. + +## Mathematical operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday& operator +=(const etl::chrono::weekdays& ms) +ETL_NOEXCEPT +``` +**Description** +Plus-equals operator adding `etl::chrono::weekdays`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday& operator -=(const etl::chrono::weekdays& ms) +ETL_NOEXCEPT +``` +**Description** +Minus-equals operator subtracting `etl::chrono::weekdays`. + +## Constants + +```cpp +ETL_NODISCARD +static +ETL_CONSTEXPR14 +etl::chrono::weekday min() +ETL_NOEXCEPT +``` +**Description** +The minimum weekday value for which `ok()` will return true. + +--- + +```cpp +ETL_NODISCARD +static +ETL_CONSTEXPR14 +etl::chrono::weekday max() +ETL_NOEXCEPT +``` +**Description** +The maximum weekday value for which `ok()` will return true. + +## Non-member mathematical operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday operator +(const etl::chrono::weekday& m, + const etl::chrono::weekdays& ms) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::weekdays` to `etl::chrono::weekday`. +**Return** +`etl::chrono::weekday`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday operator +(const etl::chrono::weekdays& ms, + const etl::chrono::weekday& m) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::weekday` to `etl::chrono::weekdays`. +**Return** +`etl::chrono::weekday`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday operator -(const etl::chrono::weekday& m, + const etl::chrono::weekdays& ms) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::weekdays` from `etl::chrono::weekday`. +**Return** +`etl::chrono::weekday`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday operator -(const etl::chrono::weekdays& ms, + const etl::chrono::weekday& m) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::weekday` from `etl::chrono::weekdays`. +**Return** +`etl::chrono::weekdays`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekdays operator -(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::weekday` from `etl::chrono::weekday`. +**Return** +`etl::chrono::weekdays`. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) +ETL_NOEXCEPT +``` +**Description** +Less-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) +ETL_NOEXCEPT +``` +**Description** +Less-than-or-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >=(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) +ETL_NOEXCEPT +``` +**Description** +Greater-than-or-equal operator. + +--- + +```cpp +[[nodiscard]] inline constexpr +auto operator <=>(const etl::chrono::weekday& m1, + const etl::chrono::weekday& m2) +noexcept +``` +**Description** +Spaceship operator. +C++20 + +## Defined weekdays + +```cpp +etl::chrono::Monday +etl::chrono::Tuesday +etl::chrono::Wednesday +etl::chrono::Thursday +etl::chrono::Friday +etl::chrono::Saturday +etl::chrono::Sunday +``` + +## Hash + +```cpp +template <> +struct hash +``` +**Description** +Hash function for `etl::chrono::weekday`. diff --git a/docs/chrono/weekday/weekday_indexed.md b/docs/chrono/weekday/weekday_indexed.md new file mode 100644 index 00000000..9e6f22a4 --- /dev/null +++ b/docs/chrono/weekday/weekday_indexed.md @@ -0,0 +1,129 @@ +--- +title: "weekday_indexed" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::weekday_indexed](https://en.cppreference.com/w/cpp/chrono/weekday_last.html) +{{< /callout >}} + +A class representing an indexed weekday. + +```cpp +class weekday_indexed +``` + +## Construction + +```cpp +ETL_CONSTEXPR +weekday_indexed() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +weekday_indexed(const etl::chrono::weekday& wd, unsigned index) +ETL_NOEXCEPT +``` +**Description** +Construct from `weekday` and `index`. + +--- + +```cpp +ETL_CONSTEXPR14 +weekday_indexed(const etl::chrono::weekday_indexed& other) +ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the weekday_indexed is valid + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool is_weekend() const +ETL_NOEXCEPT +``` +**Return** +`true` if the `weekday_indexed` is a `Saturday` or `Sunday`. + +## Assignment + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday_indexed& operator =(const etl::chrono::weekday_indexed& rhs) +ETL_NOEXCEPT +``` +**Description** +Assignment operator + +## Access + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday weekday() const +ETL_NOEXCEPT +``` +**Description** +Gets the weekday. + +--- + +```cpp +ETL_CONSTEXPR14 +unsigned index() const +ETL_NOEXCEPT +``` +**Description** +Gets the index. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::weekday_indexed& m1, + const etl::chrono::weekday_indexed& m2) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::weekday_indexed& m1, + const etl::chrono::weekday_indexed& m2) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +## Hash + +```cpp +template <> +struct hash +``` +**Description** +Hash function for `etl::chrono::weekday_indexed`. + \ No newline at end of file diff --git a/docs/chrono/weekday/weekday_last.md b/docs/chrono/weekday/weekday_last.md new file mode 100644 index 00000000..d1219e57 --- /dev/null +++ b/docs/chrono/weekday/weekday_last.md @@ -0,0 +1,107 @@ +--- +title: "weekday_last" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::weekday_last](https://en.cppreference.com/w/cpp/chrono/weekday_last.html) +{{< /callout >}} + +A class representing the last day of a weekday. + +```cpp +class weekday_last +``` + +## Construction + +```cpp +ETL_CONSTEXPR +weekday_last() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +weekday_last(const etl::chrono::weekday& wd) +ETL_NOEXCEPT +``` +**Description** +Construct from weekday and index. + +--- + +```cpp +ETL_CONSTEXPR14 +weekday_last(const etl::chrono::weekday_last& other) +ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +--- + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the weekday_last valid. + +## Assignment + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday_last& operator =(const etl::chrono::weekday_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Assignment operator + +## Access + +```cpp +ETL_CONSTEXPR14 +etl::chrono::weekday weekday() const +ETL_NOEXCEPT +``` +**Description** +Gets the weekday. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::weekday_last& m1, + const etl::chrono::weekday_last& m2) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::weekday_last& m1, + const etl::chrono::weekday_last& m2) +ETL_NOEXCEPT +**Description** +Inequality operator. + +## Hash + +```cpp +template <> +struct hash +``` +**Description** +Hash function for `etl::chrono::weekday_last`. diff --git a/docs/chrono/year/_index.md b/docs/chrono/year/_index.md new file mode 100644 index 00000000..bc9b9e27 --- /dev/null +++ b/docs/chrono/year/_index.md @@ -0,0 +1,17 @@ +--- +title: "Years" +weight: 100 +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono](https://en.cppreference.com/w/cpp/chrono.html) +{{< /callout >}} + +Classes that represent years. + +`etl::chrono::year` +`etl::chrono::year_month` +`etl::chrono::year_month_day` +`etl::chrono::year_month_day_last` diff --git a/docs/chrono/year/year.md b/docs/chrono/year/year.md new file mode 100644 index 00000000..9d409d4a --- /dev/null +++ b/docs/chrono/year/year.md @@ -0,0 +1,328 @@ +--- +title: "year" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::year](https://en.cppreference.com/w/cpp/chrono/year.html) +{{< /callout >}} + +A class representing a year. + +```cpp +class year +``` + +## Member types + +`rep` The internal representation. + +## Construction +```cpp +ETL_CONSTEXPR +year() +ETL_NOEXCEPT +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR +explicit year(unsigned value) +ETL_NOEXCEPT +``` +**Description** +Construct from unsigned. + +--- + +```cpp +ETL_CONSTEXPR14 +year(const etl::chrono::year& other) +ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +## Tests +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +int compare(const etl::chrono::year& other) const +ETL_NOEXCEPT +``` +**Description** +Compare day with another. +if `year < other`, returns `-1` +else if `year > other`, returns `1` +else returns `0` + +## Assignment +```cpp +ETL_CONSTEXPR14 +etl::chrono::year& operator =(const etl::chrono::year& rhs) +ETL_NOEXCEPT +``` +**Description** +Assignment operator + +## Increment / decrement +```cpp +ETL_CONSTEXPR14 +etl::chrono::year& operator ++() +ETL_NOEXCEPT +``` +**Description** +Pre-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year operator ++(int) +ETL_NOEXCEPT +``` +**Description** +Post-increment operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year& operator --() +ETL_NOEXCEPT +``` +**Description** +Pre-decrement operator. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year operator --(int) +ETL_NOEXCEPT +``` +**Description** +Post-decrement operator. + +## Mathematical operators +```cpp +ETL_CONSTEXPR14 +etl::chrono::year& operator +=(const etl::chrono::years& ys) +ETL_NOEXCEPT +``` +**Description** +Plus-equals operator adding etl::chrono::years. + +--- +```cpp +ETL_CONSTEXPR14 +etl::chrono::year& operator -=(const etl::chrono::years& ys) +ETL_NOEXCEPT +``` +**Description** +Minus-equals operator subtracting etl::chrono::years. + +## Tests +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Description** +Returns true if the year is within the valid -32767 to 32767 range. + +--- +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool is_leap() const +ETL_NOEXCEPT +``` +**Description** +Returns true if the year is a leap year. + +## Constants +```cpp +ETL_NODISCARD +static +ETL_CONSTEXPR14 +etl::chrono::year min() +ETL_NOEXCEPT +``` +**Description** +The minimum year value for which ok() will return true. + +--- + +```cpp +ETL_NODISCARD +static +ETL_CONSTEXPR14 +etl::chrono::year max() +ETL_NOEXCEPT +``` +**Description** +The maximum year value for which ok() will return true. + +## Conversion +```cpp +ETL_CONSTEXPR14 +operator int() const +ETL_NOEXCEPT +``` +**Description** +Conversion operator to `unsigned int`. + +## Non-member mathematical operators +```cpp +ETL_CONSTEXPR14 +etl::chrono::year operator +(const etl::chrono::year& y, + const etl::chrono::years& ys) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::years` to `etl::chrono::year`. +**Return** +`etl::chrono::year`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year operator +(const etl::chrono::years& ys, + const etl::chrono::year& y) +ETL_NOEXCEPT +``` +**Description** +Add `etl::chrono::year` to `etl::chrono::years`. +**Return** +`etl::chrono::year`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year operator -(const etl::chrono::year& y, + const etl::chrono::years& ys) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::years` from `etl::chrono::year`. +**Return** +`etl::chrono::year`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year operator -(const etl::chrono::years& ys, + const etl::chrono::year& y) +ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::year` from `etl::chrono::years`. +**Return** +`etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::years operator -(const etl::chrono::year& y1, + const etl::chrono::year& y2) ETL_NOEXCEPT +``` +**Description** +Subtract `etl::chrono::year` from `etl::chrono::year`. +**Return** +`etl::chrono::years`. + +## Non-member comparison operators +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::year& y1, + const etl::chrono::year& y2) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::year& y1, + const etl::chrono::year& y2) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <(const etl::chrono::year& y1, + const etl::chrono::year& y2) +ETL_NOEXCEPT +``` +**Description** +Less-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator <=(const etl::chrono::year& y1, + const etl::chrono::year& y2) +ETL_NOEXCEPT +``` +**Description** +Less-than-or-equal operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >(const etl::chrono::year& y1, + const etl::chrono::year& y2) +ETL_NOEXCEPT +``` +**Description** +Greater-than operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator >=(const etl::chrono::year& y1, + const etl::chrono::year& y2) +ETL_NOEXCEPT +``` +**Description** +Greater-than-or-equal operator. + +--- + +```cpp +[[nodiscard]] inline constexpr +auto operator <=>(const etl::chrono::year& y1, + const etl::chrono::year& y2) +noexcept +``` +**Description** +Spaceship operator. +C++20 + +## Hash +```cpp +template +struct hash +``` +**Description** +Hash function for `etl::chrono::year`. + diff --git a/docs/chrono/year/year_month.md b/docs/chrono/year/year_month.md new file mode 100644 index 00000000..9c271073 --- /dev/null +++ b/docs/chrono/year/year_month.md @@ -0,0 +1,214 @@ +--- +title: "year_month" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::year_month](https://en.cppreference.com/w/cpp/chrono/year_month.html) +{{< /callout >}} + +A class representing a year and month. + +```cpp +class year_month +``` + +## Construction +```cpp +ETL_CONSTEXPR +year_month() +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +year_month(const etl::chrono::year& y, + const etl::chrono::month& m) +ETL_NOEXCEPT +``` +**Description** +Construct from month and day. + +## Access + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::year year() const +ETL_NOEXCEPT +``` +**Return** +The year. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month month() const +ETL_NOEXCEPT +``` +**Return** +The month. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the year and month is within the valid limits. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +int compare(const etl::chrono::year_month& other) const +ETL_NOEXCEPT +``` +**Description** +If `y < other.y` return `-1` +If `y > other.y` return `1` +If `m < other.m` return `-1` +If `m > other.m` return `1` +Else return `0` + +## Non-member mathematical operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator +(const etl::chrono::year_month& ym, + const etl::chrono::years& dy) +``` +**Description** +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator +(const etl::chrono::years& dy, + const etl::chrono::year_month& ym) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator +(const etl::chrono::year_month& ym, + const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator +(const etl::chrono::months& dm, + const etl::chrono::year_month& ym) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator -(const etl::chrono::year_month& ym, + const etl::chrono::years& dy) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator -(const etl::chrono::year_month& ym, + const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::months operator -(const etl::chrono::year_month& ym1, + const etl::chrono::year_month& ym2) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::year_month`. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::year_month& lhs, + const etl::chrono::year_month& rhs) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::year_month& lhs, + const etl::chrono::year_month& rhs) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +[[nodiscard]] friend constexpr +auto operator <=>(const etl::chrono::year_month& lhs, + const etl::chrono::year_month& rhs) +ETL_NOEXCEPT +``` +**Description** +Spaceship operator +C++20 + +--- + +``` +ETL_CONSTEXPR14 +int compare(const year_month& other) const +ETL_NOEXCEPT +``` +**Description** +Compare year_month with another. +if `month < other.month`, returns `-1` +else if `month > other.month`, returns `1` +else if `day < other.day`, returns `-1` +else if `day > other.day`, returns `1` +else returns `0`; + +## Hash + +template +struct hash +**Description** +Hash function for `etl::chrono::year_month`. diff --git a/docs/chrono/year/year_month_day.md b/docs/chrono/year/year_month_day.md new file mode 100644 index 00000000..728971de --- /dev/null +++ b/docs/chrono/year/year_month_day.md @@ -0,0 +1,277 @@ +--- +title: "year_month_day" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::year_month_day](https://en.cppreference.com/w/cpp/chrono/year_month_day.html) +{{< /callout >}} + +A class representing a year, month, and day. + +```cpp +class year_month_day +``` + +## Construction + +```cpp +ETL_CONSTEXPR year_month_day() +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +year_month_day(const etl::chrono::year& y, + const etl::chrono::month& m, + const etl::chrono::day& d) +ETL_NOEXCEPT +``` +**Description** +Construct from `month` and `day`. + +--- + +```cpp +ETL_CONSTEXPR14 +year_month_day(const etl::chrono::year_month_day_last& ymdl) +ETL_NOEXCEPT +``` +**Description** +Construct from `year_month_day_last`. + +--- + +```cpp +ETL_CONSTEXPR14 +year_month_day(const etl::chrono::sys_days& sd) +ETL_NOEXCEPT +``` +**Description** +Construct from `sys_days`. + +--- + +```cpp +ETL_CONSTEXPR14 +year_month_day(const etl::chrono::local_days& ld) +ETL_NOEXCEPT +``` +**Description** +Construct from `local_days`. + +## Access + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::year year() const +ETL_NOEXCEPT +``` +**Return** +The year. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month month() const +ETL_NOEXCEPT +``` +**Return** +The month. + +--- + +``` +ETL_NODISCARD +ETL_CONSTEXPR14 etl::chrono::day day() const +ETL_NOEXCEPT +``` +**Return** +The day. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the year and month is within the valid limits. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +int compare(const etl::chrono::year_month_day& other) const +ETL_NOEXCEPT +``` +**Description** +Compare `year_month_day` with another. +if `year < other.year`, returns `-1` +else if `year > other.year`, returns `1` +if `month < other.month`, returns `-1` +else if `month > other.month`, returns `1` +else if `day < other.day`, returns `-1` +else if `day > other.day`, returns `1` +else returns `0` + +## operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day& operator +=(const etl::chrono::years& dy) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day& operator +=(const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day& operator -=(const etl::chrono::years& dy) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::years`. + +--- + +``` +ETL_CONSTEXPR14 +etl::chrono::year_month_day& operator -=(const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::months`. + +## Non-member operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day operator +(const etl::chrono::year_month_day& ym, + const etl::chrono::years& dy) +``` +**Description** +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day operator +(const etl::chrono::years& dy, + const etl::chrono::year_month_day& ym) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day operator +(const etl::chrono::year_month_day& ym, + const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +``` +ETL_CONSTEXPR14 +etl::chrono::year_month operator +(const etl::chrono::months& dm, + const etl::chrono::year_month_day& ym) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator -(const etl::chrono::year_month_day& ym, + const etl::chrono::years& dy) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month operator -(const etl::chrono::year_month_day& ym, + const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::months`. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::year_month_day& lhs, + const etl::chrono::year_month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::year_month_day& lhs, + const etl::chrono::year_month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +[[nodiscard]] friend constexpr +auto operator <=>(const etl::chrono::year_month_day& lhs, + const etl::chrono::year_month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Spaceship operator +C++20 + +## Hash + +```cpp +template <> +struct hash +``` +**Description** +Hash function for `etl::chrono::year_month_day`. + + + diff --git a/docs/chrono/year/year_month_day_last.md b/docs/chrono/year/year_month_day_last.md new file mode 100644 index 00000000..426a51ab --- /dev/null +++ b/docs/chrono/year/year_month_day_last.md @@ -0,0 +1,251 @@ +--- +title: "year_month_day_last" +--- + +{{< callout type="info">}} + Header: `chrono.h` + From: `20.41.0` + Similar to: [std::chrono::year_month_day_last](https://en.cppreference.com/w/cpp/chrono/year_month_day_last.html) +{{< /callout >}} + +A class representing a year, month and last day. + +```cpp +class year_month_day_last +``` + +## Construction + +```cpp +ETL_CONSTEXPR year_month_day_last() +``` +**Description** +Default constructor. + +--- + +```cpp +ETL_CONSTEXPR14 +year_month_day(const etl::chrono::year& y, + const etl::chrono::month_day_last& mdl) +ETL_NOEXCEPT +``` +**Description** +Construct from month and day. + +--- + +```cpp +ETL_CONSTEXPR14 +year_month_day(const etl::chrono::year_month_day_last& ymdl) +ETL_NOEXCEPT +``` +**Description** +Construct from `year_month_day_last`. + +## Access + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::year year() const +ETL_NOEXCEPT +``` +**Return** +The year. + +--- + +```coo +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month month() const +ETL_NOEXCEPT +``` +**Return** +The month. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +etl::chrono::month_day_last month_day_last() const +ETL_NOEXCEPT +``` +**Returns** +The month. + +## Tests + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +bool ok() const +ETL_NOEXCEPT +``` +**Return** +`true` if the year and month is within the valid limits. + +--- + +```cpp +ETL_NODISCARD +ETL_CONSTEXPR14 +int compare(const etl::chrono::year_month_day_last& other) const +ETL_NOEXCEPT +``` +**Description** +Compare `year_month_day` with another. +if `year < other.year`, returns `-1` +else if `year > other.year`, returns `1` +if `month < other.month`, returns `-1` +else if `month > other.month`, returns `1` +else returns `0` + +## operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last& operator +=(const etl::chrono::years& dy) +ETL_NOEXCEPT +``` +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last& operator +=(const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last& operator -=(const etl::chrono::years& dy) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last& operator -=(const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::months`. + +## Non-member operators + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator +(const etl::chrono::year_month_day_last& ym, + const etl::chrono::years& dy) +``` +**Description** +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator +(const etl::chrono::years& dy, + const etl::chrono::year_month_day_last& ym) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator +(const etl::chrono::year_month_day_last& ym, + const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator +(const etl::chrono::months& dm, + const etl::chrono::year_month_day_last& ym) +ETL_NOEXCEPT +``` +**Description** +Adds `etl::chrono::months`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_last operator -(const etl::chrono::year_month_day_last& ym, + const etl::chrono::years& dy) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::years`. + +--- + +```cpp +ETL_CONSTEXPR14 +etl::chrono::year_month_day_last operator -(const etl::chrono::year_month_day& ym, + const etl::chrono::months& dm) +ETL_NOEXCEPT +``` +**Description** +Subtracts `etl::chrono::months`. + +## Non-member comparison operators + +```cpp +ETL_CONSTEXPR14 +bool operator ==(const etl::chrono::year_month_day_last& lhs, + const etl::chrono::year_month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Equality operator. + +--- + +```cpp +ETL_CONSTEXPR14 +bool operator !=(const etl::chrono::year_month_day_last& lhs, + const etl::chrono::year_month_day_last& rhs) +ETL_NOEXCEPT +``` +**Description** +Inequality operator. + +--- + +```cpp +[[nodiscard]] friend constexpr +auto operator <=>(const etl::chrono::year_month_day& lhs, + const etl::chrono::year_month_day& rhs) +ETL_NOEXCEPT +``` +**Description** +Spaceship operator. +C++20 + +## Hash + +```cpp +template <> +struct hash +``` +**Description** +Hash function for `etl::chrono::year_month_day_last`. diff --git a/docs/codecs/_index.md b/docs/codecs/_index.md new file mode 100644 index 00000000..f4ac827a --- /dev/null +++ b/docs/codecs/_index.md @@ -0,0 +1,6 @@ +--- +title: "Codecs" +weight: 100 +--- + +Encoder and decoder algorithms. diff --git a/docs/codecs/base64.md b/docs/codecs/base64.md new file mode 100644 index 00000000..1292cfff --- /dev/null +++ b/docs/codecs/base64.md @@ -0,0 +1,464 @@ +--- +title: "Base64" +--- + +{{< callout type="info">}} + Headers: + `base64.h` Common definitions + `base64_encoder.h` Encoder classes + `base64_decoder.h` Decoder classes + From: `20.38.17` +{{< /callout >}} + +Encodes and decodes data to and from Base64 format. + +The codecs are stream based. Data is fed in one element, or block of elements, at a time and the encoded or decoded result is written to the codec's internal output buffer. The result can be obtained in one of two ways: +- If the internal buffer is large enough to hold the entire result, it can be read directly from the codec via `begin()`/`end()` or `span()`. +- Otherwise a callback may be supplied that is called with a span of the output data each time the internal buffer becomes full, and once more with an empty span to signal that the final block has been processed. + +A separate codec class is supplied for each supported Base64 variant. + +## Encoder + +The encoder classes are declared in `base64_encoder.h`. They all derive from `etl::ibase64_encoder`, which provides the interface described below. + +| Class | Variant | Padding | +| :--- | :--- | :--- | +| `etl::base64_rfc2152_encoder` | RFC-2152 | No | +| `etl::base64_rfc3501_encoder` | RFC-3501 | No | +| `etl::base64_rfc4648_encoder` | RFC-4648 | No | +| `etl::base64_rfc4648_padding_encoder` | RFC-4648 | Yes | +| `etl::base64_rfc4648_url_encoder` | RFC-4648-URL | No | +| `etl::base64_rfc4648_url_padding_encoder` | RFC-4648-URL | Yes | + +### Template parameters +`Buffer_Size` The size of the internal output buffer, in characters. +Defaults to `etl::base64::Min_Encode_Buffer_Size` (4). +Must be a non-zero multiple of `etl::base64::Min_Encode_Buffer_Size`. + +### Member types +```cpp +typedef etl::span span_type; +typedef etl::delegate callback_type; +``` + +### Constructors +```cpp +base64_rfcXXXX_encoder() +``` +**Description** +Constructs an encoder with no callback. The encoded result is read from the internal output buffer. + +--- + +```cpp +base64_rfcXXXX_encoder(callback_type callback) +``` +**Description** +Constructs an encoder with a callback. The callback is called with a span of the encoded data each time the internal buffer becomes full, and with an empty span once the final block has been flushed. + +### Encoding +```cpp +template +bool encode(T value) +``` +**Description** +Encodes a single 8 bit value. +Enabled if `etl::is_integral` is `true` and `etl::integral_limits::bits == 8`. + +**Return** +`false` if the output buffer overflowed, otherwise `true`. + +--- + +```cpp +template +bool encode(TInputIterator input_begin, size_t input_length) +``` +**Description** +Encodes `input_length` 8 bit values starting at `input_begin`. + +**Return** +`false` if the output buffer overflowed, otherwise `true`. + +--- + +```cpp +template +bool encode(TInputIterator input_begin, TInputIterator input_end) +``` +**Description** +Encodes the 8 bit values in the range `input_begin` to `input_end`. + +**Return** +`false` if the output buffer overflowed, otherwise `true`. + +--- + +```cpp +template +bool encode_final(TInputIterator input_begin, size_t input_length) +``` +**Description** +Encodes `input_length` 8 bit values starting at `input_begin`, then flushes the final block. Equivalent to `encode()` followed by `flush()`. + +**Return** +`false` if the output buffer overflowed, otherwise `true`. + +--- + +```cpp +template +bool encode_final(TInputIterator input_begin, TInputIterator input_end) +``` +**Description** +Encodes the 8 bit values in the range `input_begin` to `input_end`, then flushes the final block. Equivalent to `encode()` followed by `flush()`. + +**Return** +`false` if the output buffer overflowed, otherwise `true`. + +--- + +```cpp +bool flush() +``` +**Description** +Encodes any remaining buffered input, including any required padding, and marks the end of the data. If a callback has been set it is called with any remaining data and then with an empty span. +Must be called once all of the input has been passed to `encode()`. Not required when `encode_final()` is used. + +**Return** +`false` if the output buffer overflowed, otherwise `true`. + +--- + +```cpp +void restart() +``` +**Description** +Resets the encoder so that it can be reused to encode a new set of data. + +### Reading the result +These functions return a useful value only when no callback has been set. The internal buffer must be large enough to hold the entire encoded result. + +```cpp +const char* begin() const +const char* cbegin() const +``` +**Return** +A pointer to the beginning of the encoded data in the internal buffer. + +--- + +```cpp +const char* end() const +const char* cend() const +``` +**Return** +A pointer to the end of the encoded data in the internal buffer. + +--- + +```cpp +size_t size() const +``` +**Return** +The number of encoded characters currently held in the internal buffer. + +--- + +```cpp +size_t max_size() const +``` +**Return** +The maximum size of the internal output buffer (`Buffer_Size`). + +--- + +```cpp +span_type span() const +``` +**Return** +A span over the encoded data in the internal buffer. + +### Status +```cpp +bool overflow() const +``` +**Return** +`true` if the output buffer has overflowed. + +--- + +```cpp +bool error() const +``` +**Return** +`true` if an error has been detected. For the encoder this is equivalent to `overflow()`. + +### Static functions +```cpp +static size_t safe_output_buffer_size(size_t input_length) +``` +**Return** +The internal buffer size required to encode `input_length` bytes in a single pass. Use this as the `Buffer_Size` template argument when the whole result is to be read from the internal buffer. + +## Decoder + +The decoder classes are declared in `base64_decoder.h`. They all derive from `etl::ibase64_decoder`, which provides the interface described below. + +| Class | Variant | Padding | +| :--- | :--- | :--- | +| `etl::base64_rfc2152_decoder` | RFC-2152 | No | +| `etl::base64_rfc3501_decoder` | RFC-3501 | No | +| `etl::base64_rfc4648_decoder` | RFC-4648 | No | +| `etl::base64_rfc4648_padding_decoder` | RFC-4648 | Yes | +| `etl::base64_rfc4648_url_decoder` | RFC-4648-URL | No | +| `etl::base64_rfc4648_url_padding_decoder` | RFC-4648-URL | Yes | + +### Template parameters +`Buffer_Size` The size of the internal output buffer, in bytes. +Defaults to `etl::base64::Min_Decode_Buffer_Size` (3). +Must be greater than or equal to `etl::base64::Min_Decode_Buffer_Size`. + +### Member types +```cpp +typedef etl::span span_type; +typedef etl::delegate callback_type; +``` + +### Constructors +```cpp +base64_rfcXXXX_decoder() +``` +**Description** +Constructs a decoder with no callback. The decoded result is read from the internal output buffer. + +--- + +```cpp +base64_rfcXXXX_decoder(callback_type callback) +``` +**Description** +Constructs a decoder with a callback. The callback is called with a span of the decoded data each time the internal buffer becomes full, and with an empty span once the final block has been flushed. + +### Decoding +```cpp +template +bool decode(T value) +``` +**Description** +Decodes a single Base64 character. +Enabled if `etl::is_integral` is `true` and `etl::integral_limits::bits == 8`. + +**Return** +`false` if an error was detected, otherwise `true`. + +--- + +```cpp +template +bool decode(TInputIterator input_begin, TInputIterator input_end) +``` +**Description** +Decodes the Base64 characters in the range `input_begin` to `input_end`. + +**Return** +`false` if an error was detected, otherwise `true`. + +--- + +```cpp +template +bool decode(TInputIterator input_begin, size_t input_length) +``` +**Description** +Decodes `input_length` Base64 characters starting at `input_begin`. + +**Return** +`false` if an error was detected, otherwise `true`. + +--- + +```cpp +template +bool decode_final(TInputIterator input_begin, TInputIterator input_end) +``` +**Description** +Decodes the Base64 characters in the range `input_begin` to `input_end`, then flushes the final block. Equivalent to `decode()` followed by `flush()`. + +**Return** +`false` if an error was detected, otherwise `true`. + +--- + +```cpp +template +bool decode_final(TInputIterator input_begin, size_t input_length) +``` +**Description** +Decodes `input_length` Base64 characters starting at `input_begin`, then flushes the final block. Equivalent to `decode()` followed by `flush()`. + +**Return** +`false` if an error was detected, otherwise `true`. + +--- + +```cpp +bool flush() +``` +**Description** +Decodes any remaining buffered input and marks the end of the data. If a callback has been set it is called with any remaining data and then with an empty span. +Must be called once all of the input has been passed to `decode()`. Not required when `decode_final()` is used. + +**Return** +`false` if an error was detected, otherwise `true`. + +--- + +```cpp +void restart() +``` +**Description** +Resets the decoder so that it can be reused to decode a new set of data. + +### Reading the result +These functions return a useful value only when no callback has been set. The internal buffer must be large enough to hold the entire decoded result. + +```cpp +const unsigned char* begin() const +const unsigned char* cbegin() const +``` +**Return** +A pointer to the beginning of the decoded data in the internal buffer. + +--- + +```cpp +const unsigned char* end() const +const unsigned char* cend() const +``` +**Return** +A pointer to the end of the decoded data in the internal buffer. + +--- + +```cpp +size_t size() const +``` +**Return** +The number of decoded bytes currently held in the internal buffer. + +--- + +```cpp +size_t buffer_size() const +``` +**Return** +The maximum size of the internal output buffer (`Buffer_Size`). + +--- + +```cpp +span_type span() const +``` +**Return** +A span over the decoded data in the internal buffer. + +### Status +```cpp +bool overflow() const +``` +**Return** +`true` if the output buffer has overflowed. + +--- + +```cpp +bool invalid_data() const +``` +**Return** +`true` if an invalid Base64 character was encountered. + +--- + +```cpp +bool error() const +``` +**Return** +`true` if an error has been detected. Equivalent to `overflow() || invalid_data()`. + +### Static functions +```cpp +static size_t safe_output_buffer_size(size_t input_length) +``` +**Return** +The internal buffer size required to decode `input_length` Base64 characters in a single pass. Use this as the `Buffer_Size` template argument when the whole result is to be read from the internal buffer. + +## Examples + +### Encode - reading the result from the internal buffer +```cpp +// The data to encode. "Hello World!" +constexpr size_t Input_Length = 12U; + +const etl::array input = +{ + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, + 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21 +}; + +// An encoder whose internal buffer is large enough to hold the entire result. +using encoder_type = etl::base64_rfc4648_encoder::safe_output_buffer_size(Input_Length)>; + +encoder_type encoder; + +// Encode all of the input and flush the final block. +encoder.encode_final(input.begin(), input.end()); + +// Copy the result out of the encoder's internal buffer. +etl::string<16> encoded(encoder.begin(), encoder.end()); +// encoded == "SGVsbG8gV29ybGQh" +``` + +--- + +### Encode - streaming the result through a callback +```cpp +etl::string<16> encoded; + +// Called with each chunk of encoded data as the internal buffer fills, +// and finally with an empty span to signal the end of the data. +auto append = [&encoded](const etl::span& chunk) +{ + encoded.append(chunk.begin(), chunk.end()); +}; + +etl::base64_rfc4648_encoder<>::callback_type callback = append; + +// A minimum size encoder that streams its output through the callback. +etl::base64_rfc4648_encoder<> encoder(callback); + +encoder.encode_final(input.begin(), input.end()); +// encoded == "SGVsbG8gV29ybGQh" +``` + +--- + +### Decode - reading the result from the internal buffer +```cpp +const etl::string<16> encoded = "SGVsbG8gV29ybGQh"; + +// A decoder whose internal buffer is large enough to hold the entire result. +using decoder_type = etl::base64_rfc4648_decoder::safe_output_buffer_size(16U)>; + +decoder_type decoder; + +// Decode all of the input and flush the final block. +decoder.decode_final(encoded.begin(), encoded.end()); + +// Copy the result out of the decoder's internal buffer. +etl::vector output(decoder.begin(), decoder.end()); +// output == { 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, +// 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21 }; // "Hello World!" +``` + diff --git a/docs/codecs/manchester.md b/docs/codecs/manchester.md new file mode 100644 index 00000000..945964c0 --- /dev/null +++ b/docs/codecs/manchester.md @@ -0,0 +1,268 @@ +--- +title: Manchester encoding and decoding +weight: 1 +--- + +{{< callout type="info">}} + Header: `manchester.h` + Support: `20.45.0` +{{< /callout >}} + +Efficient Manchester encoding and decoding of data. The Manchester code represents a data bit as a sequence of a 'high' and a 'low' values. In software this translates to a conversion from one to two bits, or in a practical situation, from `n` bytes to `n*2` bytes. + +## See also + +[Manchester code](https://en.wikipedia.org/wiki/Manchester_code) + +## Features + +- Normal and inverted Manchester encoding +- Support for multiple encoding chunk sizes: 8-bit, 16-bit and 32-bit +- Span-based operations or chunk-based operations +- Constexpr functions for compile-time encoding/decoding +- Validation of encoded data +- Chunked span I/O uses little-endian byte order for multi-byte chunks, independent of host platform endianness + +## Algorithm background + +To encode the value `0b11001100` we must first duplicate all bits to create the value `0b1111000011110000`. We then perform an XOR of this value with the constant `0b1010101010101010` (`0xAAAA`) to obtain the Manchester coded value of `0b1010010110100101`. We have now replaced each `1` bit with the sequence `10` and each `0` bit with the sequence `01`. + +### 2. Bit duplication + +Bit duplication is achieved with the following steps. This is also called binary interleaving. The example shows encoding of an 8-bit value. + +| Step | High Byte | Low Byte | Operation | +|------|--------------------|--------------------|----------------------------| +| 0 | `_ _ _ _ _ _ _ _` | `A B C D E F G H` | input value (i) | +| 1 | `_ _ _ _ A B C D` | `_ _ _ _ E F G H` | `(i \| (i << 4)) & 0x0F0F` | +| 2 | `_ _ A B _ _ C D` | `_ _ E F _ _ G H` | `(i \| (i << 2)) & 0x3333` | +| 3 | `_ A _ B _ C _ D` | `_ E _ F _ G _ H` | `(i \| (i << 1)) & 0x5555` | +| 4 | `A A B B C C D D` | `E E F F G G H H` | `(i \| (i << 1))` | + +This process can be easily extended to 16-bit or 32-bit values by adding additional steps to the bit duplication. + +### 3. Manchester Decoding + +Manchester decoding is done in a similar, but reversed way. + +### 4. Error Detection + +Error detection in Manchester coded data is done by comparing 2 neighboring bits. If they are +equal, then there is an error in the encoded input data. + +Comparing all 8 bit pairs in a 16-bit word is done as follows. + +| Step | Binary Value | Operation | Description | +|------|--------------|-------------------|-----------------------------------------------------------------------------------------------| +| 1 | `11011000` | Original | First bit pair (lsb, 00) is invalid. Last bit pair is also invalid. Other bit pairs are valid | +| 2 | `01101100` | Shift right by 1 | Shift the original value right by one bit | +| 3 | `10110100` | XOR | XOR the original with the shifted value | +| 4 | `01010101` | Mask with 0x55 | Apply mask to isolate bit pairs | +| 5 | `00010100` | Result | If result is not equal to 0x55, there was an error in the input | + +## Analysis + +Most traditional ways to Manchester encode data consist of a loop over all bits and a nested if-statement to check the value of the current bit. This approach does not scale well to increasing number of bits. The algorithm implemented here contains no conditional code and scales well. Doubling the number of processed bits per step (the chunk size) adds a single row to the bit duplication table. Because of the lack of loops and conditional code, this algorithm is likely to perform better than traditional ones on simple processors or when compiler optimization is disabled. On modern, powerful processors with caches and advanced optimization possibilities this algorithm may not show much benefit. In any case, the performance of the algorithm depends heavily on the processor type, compiler and compiler (optimization) settings. + +## Classes + +Classes `etl::manchester` and `etl::manchester_inverted` contain static functions for encoding, decoding and validity checking. It is not necessary to instantiate objects of these classes. + +### etl::manchester + +```cpp +typedef manchester_base manchester; +``` + +Manchester encoder using normal encoding (no inversion). + +### etl::manchester_inverted + +```cpp +typedef manchester_base manchester_inverted; +``` + +Manchester encoder using inverted encoding. + +## Encoding Functions + +### Encode single value + +```cpp +template +static ETL_CONSTEXPR14 typename encoded::type encode(TDecoded decoded) +``` + +Encodes a single value using Manchester encoding. + +**Parameters** + +`decoded`: The value to encode (`uint8_t`, `uint16_t`, or `uint32_t`) + +**Returns** + +The Manchester encoded value (twice the bit width of input) + +**Example** + +```cpp +uint16_t encoded = etl::manchester::encode(0x55); +``` + +### Encode range + +```cpp +template +static ETL_CONSTEXPR14 void encode(etl::span decoded, + etl::span encoded) +``` + +Encodes a span of data using the specified chunk size. + +**Parameters** + +`decoded`: Source data to encode +`encoded`: Destination for encoded data (must be twice the size of `decoded`) + +**Template Parameters** + +`TChunk`: Chunk size for encoding (`uint8_t`, `uint16_t` or `uint32_t`) + +**Example** + +```cpp +std::array data = {0x12, 0x34, 0x56, 0x78}; +std::array encoded_data1{}; +std::array encoded_data2{}; + +// Encode with TChunk == uint8_t +etl::manchester::encode(data, encoded_data1); + +// Encode with TChunk == uint32_t +etl::manchester::encode(data, encoded_data2); +``` + +## Decoding Functions + +### Decode single value + +```cpp +template +static ETL_CONSTEXPR14 typename decoded::type decode(TEncoded encoded) +``` + +**Description** + +Decodes a single Manchester encoded value. + +**Parameters** + +`encoded`: The encoded value to decode (`uint16_t`, `uint32_t`, or `uint64_t`) + +**Returns** + +The Manchester decoded value (half the bit width of input) + +**Example** + +```cpp +uint8_t decoded = etl::manchester::decode(0x5A5A); +``` +--- + +### Decode range + +```cpp +template ::type> +static ETL_CONSTEXPR14 +void decode(etl::span encoded, + etl::span decoded) +``` + +Decodes a span of Manchester encoded data. + +**Parameters** + +`encoded`: Source data to decode +`decoded`: Destination for decoded data (must be half the size of `encoded`) + +**Template Parameters** + +`TChunk`: Chunk type for decoding (`uint16_t`, `uint32_t`, or `uint64_t`) + +**Example** + +```cpp +std::array encoded = {/* ... */}; +std::array decoded1 {}; +std::array decoded2 {}; + +// Decode with TChunk == uint16_t +etl::manchester::decode(encoded, decoded1); + +// Decode with TChunk == uint64_t +etl::manchester::decode(encoded, decoded2); +``` + +## Validation Functions + +### Single value + +```cpp +template +static ETL_CONSTEXPR14 bool is_valid(TChunk encoded) +``` + +Validates that a single value contains valid Manchester encoded data. + +**Parameters** + +`encoded`: The encoded value to validate + +**Returns** + +`true` if the value contains valid Manchester encoded data, `false` otherwise + +**Example** + +```cpp +bool valid = etl::manchester::is_valid(0x5A5A); +``` + +### Range + +```cpp +static +ETL_CONSTEXPR14 +bool is_valid(etl::span encoded) +``` + +Validates that a range contains valid Manchester encoded data. + +**Parameters** + +`encoded`: The range of encoded data to validate + +**Returns** + +`true` if all data is valid Manchester encoding, `false` otherwise + +**Example** + +```cpp +std::array encoded_data = {/* ... */}; +bool valid = etl::manchester::is_valid(encoded_data); +``` + +## Input/chunk types for encoding + +`uint8_t` → `uint16_t` (if 8-bit types are supported) +`uint16_t` → `uint32_t` +`uint32_t` → `uint64_t` (if 64-bit types are supported) + +## Input/chunk types for decoding + +`uint16_t` → `uint8_t` (if 8-bit types are supported) +`uint32_t` → `uint16_t` +`uint64_t` → `uint32_t` (if 64-bit types are supported) diff --git a/docs/containers/Views/_index.md b/docs/containers/Views/_index.md new file mode 100644 index 00000000..df454f87 --- /dev/null +++ b/docs/containers/Views/_index.md @@ -0,0 +1,6 @@ +--- +title: "Views" +weight: 100 +--- + +View like containers. \ No newline at end of file diff --git a/docs/containers/Views/array-view.md b/docs/containers/Views/array-view.md new file mode 100644 index 00000000..079c3f46 --- /dev/null +++ b/docs/containers/Views/array-view.md @@ -0,0 +1,373 @@ +--- +title: "array_view" +--- + +{{< callout >}} + Header: `array_view.h` + Since: All versions + Similar to: [gsl::array_view](https://learn.microsoft.com/en-us/previous-versions/cpp/parallel/amp/reference/array-view-class) +{{< /callout >}} + +This class implements a view in to a range of a C array, `etl::array`, `std::array`, `etl::vector` and `std::vector`. +It will support construction from any class that supports data() and size() member functions as well as plain C arrays. + +If `ETL_ARRAY_VIEW_IS_MUTABLE` is defined, then the contents of the view are mutable. +The view is non-mutable by default, which is the opposite to the behaviour in 17.5.0 or earlier. + +```cpp +etl::array_view +``` + +## Template deduction guides +**C++17 and above** +```cpp +template +etl::array_view(TArray& a) + -> etl::array_view; +``` +```cpp +template +etl::array_view(const TIterator begin_, const TIterator end_) + -> etl::array_view>; +``` +```cpp +template +etl::array_view(const TIterator begin_, const TSize size_) + -> etl::array_view>; +``` + +## Examples + +```cpp +etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + +etl::array_view view1{ data }; +etl::array_view view2{ data.begin(), data.end() }; +etl::array_view view3{ data.begin(), data.size() }; +etl::array_view view4{ view1 }; +``` +## Member types + +`value_type` +`size_type` +`difference_type` +`reference` +`const_reference` +`pointer` +`const_pointer` +`iterator` +`const_iterator` +`reverse_iterator` +`const_reverse_iterator` + +## Constructors + +```cpp +ETL_CONSTEXPR array_view() +``` +**Description** +Default constructor. + +--- + +```cpp +template +ETL_CONSTEXPR explicit array_view(TArray& a) +``` +**Description** +Construct from array or vector like class. + +--- + +```cpp +template +ETL_CONSTEXPR array_view(TIterator begin_, TIterator end_) +``` +**Description** +Construct from an iterator or pointer range. + +--- + +```cpp +template +ETL_CONSTEXPR array_view(TIterator begin_, TSize size_) +``` +**Description** +Construct from a start and size + +--- + +```cpp +template +ETL_CONSTEXPR explicit array_view(T(&begin_)[ARRAY_SIZE]) +``` +**Description** +Construct from a compile time sized C array. + +--- + +```cpp +ETL_CONSTEXPR array_view(const array_view& other) +``` +**Description** +Copy constructor. + +## Modifiers + +```cpp +template +void assign(TIterator begin_, TIterator end_) +``` +**Description** +Assigns begin and end of the supplied range. +Does not copy the elements in the range. + +--- + +```cpp +template +void assign(TIterator begin_, TSize size_) +``` +**Description** +Assign from a start iterator and length. +Does not copy the elements in the range. + +--- + +```cpp +void remove_prefix(size_type n) +``` +**Description** +Shrinks the view from the front. +A value of `n` larger than the array will result in undefined behaviour. + +--- + +```cpp +void remove_suffix(size_type n) +``` +**Description** +Shrinks the view from the back. +A value of `n` larger than the array will result in undefined behaviour. + +--- +```cpp +void fill(value_type value) +``` +*Introduced:* `20.24.0` + +**Description** +Fill the underlying array with value. + +## Element access + +Mutable access is only possible by defining the macro `ETL_ARRAY_VIEW_IS_MUTABLE`. +In this case, `reference`, `pointer`, `iterator` and `reverse_iterator` are defined as their `const` counterparts. + +```cpp +reference at(size_t i) +const_reference at(size_t i) const +``` +**Description** +Gets a reference or const reference to the indexed element. +Emits an `etl::array_view_uninitialised` if the view is not initialised. +Emits an `etl::array_view_bounds` if the index is not in range. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +**Parameters** +`i` The index. + +**Returns** +A reference or const reference to the indexed element + +--- + +```cpp +reference operator[](size_t i) +const_reference operator[](size_t i) const +``` +**Description** +Gets a reference or const reference to the indexed element. + +**Returns** +A reference or const reference to the indexed element. +Undefined behaviour if the `array_view` is empty. + +--- + +```cpp +reference front() +const_reference front() const +``` +**Description** +Gets a reference or const reference to the first element. + +**Returns** +A reference or const reference to the first element. +Undefined behaviour if the `array_view` is empty. + +--- + +```cpp +reference back() +const_reference back() const +``` +**Description** +Gets a reference or const reference to the last element. + +**Returns** +A reference or const reference to the last element. +Undefined behaviour if the `array_view` is empty. + +--- + +```cpp +pointer data() +const_pointer data() const +``` +**Description** +Gets a pointer or const pointer to the first element. + +**Returns** +A pointer or const pointer to the first element. +Equal to `end()` if the array_view is empty. + +## Iterators +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the array view. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the array view. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Gets a reverse iterator to the beginning of the array view. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Gets a reverse iterator to the end of the array view. + +--- + +Capacity + +```cpp +bool empty() const +``` +**Description** +Returns true if the size of the array view is zero, otherwise false. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the view. + +--- + +``` +C++size_t max_size() const +``` +**Description** +Returns the maximum possible size of the view. + +--- + +## Non-member functions +**Lexicographically comparisons** +```cpp +operator == +``` +**Description** +`true` if the contents of the lists are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the lists are not equal, otherwise `false`. + +--- + +```cpp +operator < +``` +**Description** +`true` if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator <= +``` +**Description** +`true` if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator > +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator >= +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`. + + +## Hash +There are specialisations of `etl::hash` for `array_view`. + +## Example +```cpp +etl::array data = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + +typedef etl::array_view View; + +View view(data.begin() + 2, data.end() - 2); + +void Print(const View& view) +{ + for (size_t i = 0; i < view.size(); ++i) + { + std::cout << view[i] << " "; + } +} + +Print(view); // Prints "3 4 5 6 7 8" + +size_t hashvalue = etl::hash()(view); +``` \ No newline at end of file diff --git a/docs/containers/Views/array-wrapper.md b/docs/containers/Views/array-wrapper.md new file mode 100644 index 00000000..c84afe5d --- /dev/null +++ b/docs/containers/Views/array-wrapper.md @@ -0,0 +1,266 @@ +--- +title: "array_wrapper" +--- + +{{< callout >}} + Header: `array_wrapper.h` + Since: All versions +{{< /callout >}} + +This class implements a zero cost C++ interface around a const or non-const C array. It presents the same API as std::array. +It allows legacy C data to be more easily integrated with C++ interfaces and be accessed in a less error prone fashion. +If C++11 or above is supported then most functions can be 'constexpr'. + +--- + +## Member types + +`value_type` +`size_type` +`difference_type` +`reference` +`value_type` +`reference` +`const_reference` +`pointer` +`const_pointer` +`iterator` +`const_iterator` +`reverse_iterator` +`const_reverse_iterator` + +## Member constants +**May be used as indexes in to the array.** + +`SIZE =` Size of the array +`MAX_SIZE = SIZE` +`FRONT = 0` +`BACK = SIZE - 1` +`BEGIN = 0` +`END = SIZE` +`RBEGIN = SIZE - 1` +`REND = -1` + +## Element access +```cpp +T& at(size_t i) +``` +```cpp +ETL_CONSTEXPR const T& at(size_t i) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Emits an `etl::array_wrapper_bounds` if the index isout of range of the array. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- +```cpp +T& operator[](size_t i) +``` +```cpp +ETL_CONSTEXPR const T& operator[](size_t i) const +``` +**Description** +Returns a reference or const reference to the indexed element.if the index is out of range of the array then undefined behaviour occurs.--- + +--- + +```cpp +T& front() +``` +```cpp +ETL_CONSTEXPR const T& front() const +``` +**Description** +Returns a reference or const reference to the first element.--- + +--- + +```cpp +T& back() +``` +```cpp +ETL_CONSTEXPR const T& back() const +``` +**Description** +Returns a reference or const reference to the last element.--- + +--- + +```cpp +T* data() +``` +```cpp +ETL_CONSTEXPR const T* data() const +``` +**Description** +Returns a pointer or const pointer to the array.---Modifiers + +--- +```cpp +void fill(parameter_t value) +``` +**Description** +Fill a non-cost array with the value.--- + +--- + +```cpp +template +void swap(etl::array_wrapper& other) +``` +**Description** +Swaps the array contents with another.---Iterators + +--- + +```cpp +ETL_CONSTEXPR iterator begin() +``` +```cpp +ETL_CONSTEXPR const_iterator begin() constETL_CONSTEXPR const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the array.--- + +--- + +```cpp +ETL_CONSTEXPR iterator end() +``` +```cpp +ETL_CONSTEXPR const_iterator end() constETL_CONSTEXPR const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the array.--- + +--- + +```cpp +ETL_CONSTEXPR iterator rbegin() +``` +```cpp +ETL_CONSTEXPR const_reverse_iterator rbegin() const +``` +```cpp +ETL_CONSTEXPR const_reverse_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the array.--- + +--- + +```cpp +ETL_CONSTEXPR iterator rend() +``` +```cpp +ETL_CONSTEXPR const_reverse_iterator rend() constETL_CONSTEXPR const_reverse_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the array.---Capacity + +--- + +```cpp +ETL_CONSTEXPR size_t size() const +``` +**Description** +Returns the size of the view.--- + +--- + +```cpp +ETL_CONSTEXPR size_t max_size() const +``` +**Description** +Returns the maximum possible size of the view.---Non-member functions + +## Lexicographically comparisons + +`operator ==` +**Returns** +`true` if the contents of the array views are equal, otherwise `false`. + +`operator !=` +**Returns** +`true` if the contents of the array views are not equal, otherwise `false`. + +`operator <` +**Returns** +`true` if the contents of the lhs are lexicographically less than the +contents of the rhs, otherwise `false`. + +`operator <=` +**Returns** +`true` if the contents of the lhs are lexicographically less than or equal to the +contents of the rhs, otherwise `false`. + +`operator >` +**Returns** +`true` if the contents of the lhs are lexicographically greater than the +contents of the rhs, otherwise `false`. + +`operator >=` +**Returns** +`true` if the contents of the lhs are lexicographically greater than or equal to the +contents of the rhs, otherwise `false` + +## Swap +```cpp +template +void swap(etl::array_wrapper& lhs, + etl::array_wrapper& rhs) +``` +**Description** +Swaps the array contents of two arrays. + +## Hash +There is a specialisation for `etl::hash` for `array_wrapper`. + +## Macros +A macro is defined to ease the use of the class. + +```cpp +ETL_ARRAY_WRAPPER(type, array); +``` + +**Example** + +```cpp +// The address of the array MUST be deducible at compile time. +int cdata = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + +typedef ETL_ARRAY_WRAPPER(int, cdata) Data; + +// All instances of 'Data' access the SAME array.Data data; +void Print(Data data) +{ + Data::const_iterator itr = data.begin(); + + while (itr != data.end()) + { + std::cout << *itr++ << " "; + } +} + +Print(data); // Prints "1 2 3 4 5 6 7 8 9 10" + +size_t hashvalue = etl::hash()(data); + +// Using indexes +int firstElement = data[Data::FRONT]; + +int lastElement = data[Data::BACK]; + +// Using forward indexes +for (int i = Data::BEGIN; i < Data::END; ++i) +{ + std::cout << data[i] << " "; +} + +// Using reverse indexes +for (int i = Data::RBEGIN; i < Data::REND; --i) +{ + std::cout << data[i] << " "; +} +``` diff --git a/docs/containers/Views/multi-range.md b/docs/containers/Views/multi-range.md new file mode 100644 index 00000000..20d97950 --- /dev/null +++ b/docs/containers/Views/multi-range.md @@ -0,0 +1,291 @@ +--- +title: "multi_range" +--- + +A lightweight, chainable range system that simulates nested loops over multiple ranges, with customisable stepping and end conditions. + +`etl::multi_range` is a composable range-iteration helper that can chain multiple ranges to produce nested-loop style iteration. It lets you build “outer/inner” ranges and iterate across all combinations, while customizing stepping and termination logic. + +Each range is defined as an `etl::multi_range` which may be linked to create nested multiple ranges. + +```cpp +template +class multi_range +``` + +All multi_range classes derive from `imulti_range`. + +By default, each call to next() will invoke either the forward_step or reverse_step types. +If the type is an arithmetic or pointer type then the default stepper will be automatically selected, dependent on the first and last parameters. If not, the default will be `forward_step`. + +If a custom stepper for the type is required, then it may be defined in the constructor. + +By default, each call to `completed()` will invoke `not_equal_compare` against the terminating range value. If a custom incrementor for the type is required, then it may be defined in the constructor. + +## Types + +`value_type` +The type of the range. + +`const_reference` +The const reference type of the range. + +--- + +`step_type` +Pure abstract base. +Inherit from this to define custom step functionality. + +`forward_step` +A pre-defined step type that calls the type's `operator++()`. +This is the default step type if the type is arithmetic or random access iterator and the range is ascending, or the type is not an arithmetic or pointer. + +`forward_step_by` +A pre-defined step type that calls the type's `operator+=()`. +The constructor requires the step value to add. + +`reverse_step` +A pre-defined step type that calls the type's `operator--()`. +This is the default step type if the type is arithmetic or random access iterator and the range is descending. + +`reverse_step_by` +A pre-defined step type that calls the type's `operator-=()`. +The constructor requires the step value to subtract. + +--- + +`compare_type` +Pure abstract base. +Inherit from this to define custom compare functionality. + +`not_equal_compare` +A pre-defined step type that calls etl::not_equal_to. +This is the default compare type. + +`less_than_compare` +A pre-defined step type that calls `etl::less`. + +`greater_than_compare` +A pre-defined step type that calls `etl::greater`. + +## Constructor + +```cpp +multi_range(value_type start, + value_type last) +``` +**Description** +Initialises the loop where start is the initial value and last is the terminate value. + +--- + +```cpp +multi_range(value_type first, + value_type last, + step_type& stepper) +``` +**Description** +Initialises the loop where start is the initial value and last is the terminate value. +stepper will be called to increment the current range value. + +--- + +```cpp +multi_range(value_type first, + value_type last, + compare_type& compare) +``` +**Description** +Initialises the loop where start is the initial value and last is the terminate value. +compare will be called to compare with the terminating value. + +--- + +```cpp +multi_range(value_type first, + value_type last, + step_type& stepper, + compare_type& compare) +``` +**Description** +Initialises the loop where start is the initial value and last is the terminate value. +stepper will be called to increment the current range value. +compare will be called to compare with the terminate value. + +## Modifiers + +The nested ranges may be constructed in a variety of ways. + +```cpp +imulti_range& append(imulti_range& inner_ranges) +``` +**Description** +Appends inner loop(s) to the current range(s). +If the current range, **A**, is linked to ranges **B** & **C** in the order **A** -> **B** -> **C** and the new linked ranges are **D** -> **E**, +`A.append(D)` will result in **A** -> **B** -> **C** -> **D** -> **E**. + +--- + +```cpp +imulti_range& insert(imulti_range& inner_ranges) +``` +**Description** +Inserts inner range(s) after the current range. +If the current range, **A**, is linked to ranges **B** & **C** in the order **A** -> **B** -> **C** and the new linked ranges are **D** -> **E**, +`A.insert(D)` will result in **A** -> **D** -> **E** -> **B** -> **C**. + +--- + +```cpp +void detach() +``` +**Description** +Unlinks this range from its inner ranges. + +--- + +```cpp +void detach_all() +``` +**Description** +Unlinks this range and all its inner ranges from each other. + +## Access + +```cpp +const_reference value() const; +``` +**Description** +Gets a const reference to the current value + +--- + +```cpp +const_reference begin() const; +``` +**Description** +Gets a const reference to the first value + +--- + +```cpp +const_reference end() const; +``` +**Description** +Gets a const reference to the terminate value + +--- + +```cpp +bool completed() const +``` +**Description** +Returns true if the range, and all of its inner ranges, have completed. + +--- + +```cpp +size_t number_of_ranges() const +``` +**Description** +Returns the number of linked ranges, starting from this. +For linked ranges **A** -> **B** -> **C** -> **D** -> **E**, `B.number_of_ranges()` returns `4`. + +--- + +```cpp +size_t number_of_iterations() +``` +**Description** +Returns the total number of iterations for all linked ranges, starting from this. +For linked ranges **A** -> **B** -> **C** -> **D** -> **E**, and a range size of `5` for each one, +`B.number_of_iterations()` returns `625` (`5 * 5 * 5 * 5`). + +This function is not const as it must simulate the running of all of the nested ranges. + +## Operations + +```cpp +void start() +``` +**Description** +Resets the range, and all its linked inner ranges to the starting conditions, with each range reset to its begin value. + +--- + +```cpp +void next() +``` +**Description** +Moves to the next iteration of the nested range. + +--- + +## Example + +```cpp +using Iterator = std::forward_list::const_iterator; + +// Less Than compare type +using LessThanCompare = etl::multi_range::less_than_compare; + +// Decrementing step type +using DecrementPtr = etl::multi_range::reverse_step; + +using Outer = etl::multi_range; // Incrementing int +using Middle = etl::multi_range; // Decrementing const short* +using Inner = etl::multi_range; // Incrementing const_iterator + +const short data[4] = { 0, 1, 2, 3 }; + +std::forward_list strings = +{ + "zero", "one", "two", "three" +}; + +LessThanCompare lessThan; +DecrementPtr decrementPtr; + +// Setup the loops. +Outer outer(0, 4, lessThan); +Middle middle(data + 3, data - 1, decrementPtr); +Inner inner(strings.begin(), strings.end()); + +outer.append(middle).append(inner); + +size_t n_outer_loops = outer.number_of_loops(); // == 3 +size_t n_middle_loops = middle.number_of_loops(); // == 2 +size_t n_inner_loops = inner.number_of_loops(); // == 1 + +size_t n_outer_iterations = outer.number_of_iterations(); // == 64 +size_t n_middle_iterations = middle.number_of_iterations(); // == 16 +size_t n_inner_iterations = inner.number_of_iterations(); // == 4 + +// Create const references to the loop values. +const int& value_outer = outer.value(); +const short*& value_middle = middle.value(); +const Iterator& value_inner = inner.value(); + +// Iterate through the nested loops. +int i = 0; + +for (outer.start(); !outer.completed(); outer.next()) +{ + std::cout << "Iteration " << i++ << " : " + << "Outer = " << value_outer << " : " + << "Middle = " << *value_middle << " : " + << "Inner = " << *value_inner + << "\n"; +} + +// Just iterate through the two nested loops. +i = 0; + +for (middle.start(); !middle.completed(); middle.next()) +{ + std::cout << "Iteration " << i++ << " : " + << "Middle = " << *value_middle << " : " + << "Inner = " << *value_inner + << "\n"; +} +``` diff --git a/docs/containers/Views/multi-span.md b/docs/containers/Views/multi-span.md new file mode 100644 index 00000000..0c2fd2ed --- /dev/null +++ b/docs/containers/Views/multi-span.md @@ -0,0 +1,189 @@ +--- +title: "multi_span" +--- + +{{< callout >}} + Header: `multi_span.h` +{{< /callout >}} + +This class implements a span of a range of spans. +Allows implementation of Scatter/Gather to multiple buffers or ports. +Iterating through the `multi_span` will iterate through the collection of spans consecutively. +The list of spans must be in a contiguous list, such as an array or vector. + +```cpp +etl::multi_span +``` +Where `T` is the element type of the spans. + +## Member types + +```cpp +element_type T +value_type remove_cv::type +size_type size_t +difference_type ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator Forward iterator <20.39.5 + Bidirectional iterator >=20.39.5 +const_iterator Constant Forward iterator <20.39.5 + Constant bidirectional iterator >=20.39.5 +reverse_iterator ETL_OR_STD::reverse_iterator +const_reverse_iterator ETL_OR_STD::reverse_iterator + +span_type etl::span +span_list_type etl::span +``` + +## Constructors + +ETL_CONSTEXPR multi_span(span_list_type span_list) +**Description** +Construct from a span of spans. + +--- + +template +ETL_CONSTEXPR multi_span(TContainer& a) ETL_NOEXCEPT +**Description** +Construct from a container of spans. + +--- + +template +ETL_CONSTEXPR multi_span(const TContainer& a) ETL_NOEXCEPT +**Description** +Construct from a const container of spans. + +--- + +template +ETL_CONSTEXPR multi_span(TIterator begin, TIterator end) +**Description** +Construct from a range of spans. + +--- + +template +ETL_CONSTEXPR multi_span(TIterator begin, size_t length) +**Description** +Construct from a range of spans. + +--- + +ETL_CONSTEXPR multi_span(const multi_span& other) +**Description** +Copy constructor. + +## Access + +```cpp +ETL_CONSTEXPR14 multi_span& operator =(const multi_span& other) ETL_NOEXCEPT +``` +**Description** +Assign from a other `multi_span`. + +## Iterators + +```cpp +ETL_CONSTEXPR iterator begin() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the beginning of the span. + +--- + +```cpp +ETL_CONSTEXPR iterator end() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the end of the span. + +--- + +```cpp +ETL_CONSTEXPR iterator cbegin() const ETL_NOEXCEPT +``` +**Description** +Returns a const iterator to the beginning of the span. +From: `20.39.5` + +--- + +```cpp +ETL_CONSTEXPR iterator cend() const ETL_NOEXCEPT +``` +**Description** +Returns a const iterator to the end of the span. +From: `20.39.5` + +--- + +```cpp +ETL_CONSTEXPR iterator rbegin() const ETL_NOEXCEPT +``` +**Description** +Returns a reverse iterator to the beginning of the span. +From: `20.39.5` + +--- + +```cpp +ETL_CONSTEXPR iterator rend() const ETL_NOEXCEPT +``` +**Description** +Returns a reverse iterator to the end of the span. +From: `20.39.5` + +--- + +```cpp +ETL_CONSTEXPR iterator crbegin() const ETL_NOEXCEPT +``` +**Description** +Returns a const reverse iterator to the beginning of the span. +From: `20.39.5` + +--- + +```cpp +ETL_CONSTEXPR iterator crend() const ETL_NOEXCEPT +``` +**Description** +Returns a const reverse iterator to the end of the span. +From: `20.39.5` + +## Capacity + +```cpp +ETL_CONSTEXPR bool empty() const ETL_NOEXCEPT +``` +**Description** +Returns true if the size of the multi_span is zero, otherwise false. + +--- + +```cpp +ETL_CONSTEXPR size_t size() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the multi_span. + +--- + +```cpp +ETL_CONSTEXPR size_t size_bytes() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the multi_span in bytes. + +--- + +```cpp +ETL_CONSTEXPR size_t size_spans() const ETL_NOEXCEPT +``` +**Description** +Returns the number of the spans. diff --git a/docs/containers/Views/poly-span.md b/docs/containers/Views/poly-span.md new file mode 100644 index 00000000..376c35ef --- /dev/null +++ b/docs/containers/Views/poly-span.md @@ -0,0 +1,361 @@ +--- +title: "poly_span" +--- + +{{< callout >}} + Header: `poly_span.h` + From: `20.31.0` +{{< /callout >}} + +Polymorphic span. +This class implements a view in to a contiguous range through a base type. + +```cpp +etl::poly_span +``` + +## Template deduction guides +C++17 + +```cpp +template +poly_span(const TIterator begin, const TIterator end) + ->poly_span, etl::dynamic_extent>; +``` + +```cpp +template +poly_span(const TIterator begin, const TSize size) + ->poly_span, etl::dynamic_extent>; +``` + +```cpp +template +poly_span(T(&)[N]) + -> poly_span; +``` + +```cpp +template +poly_span(etl::array&) + -> poly_span; +``` + +```cpp +template +poly_span(const etl::array&) + -> poly_span; +``` + +```cpp +template +poly_span(std::array&) + ->poly_span; +``` + +```cpp +template +poly_span(const std::array&) + ->poly_span; +``` + +## Member types + +```cpp +element_type T +value_type remove_cv::type +size_type size_t +difference_type ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator Random access iterator +reverse_iterator ETL_OR_STD::reverse_iterator +``` + +## Constructors + +```cpp +ETL_CONSTEXPR poly_span() ETL_NOEXCEPT +``` + +--- + +```cpp +template +ETL_CONSTEXPR poly_span(const TIterator begin, const TSize size) ETL_NOEXCEPT +``` +**Description** +Static asserts if `etl::iterator_traits::iterator_category` is not `random_access_iterator_tag` +or `etl::iterator_traits::value_type` is not the same as, or not derived from `TBase`. + +--- + +```cpp +template +ETL_CONSTEXPR poly_span(const TIterator begin, const TIterator end) +``` +**Description** +Static asserts if `etl::iterator_traits::iterator_category` is not `random_access_iterator_tag` +or `etl::iterator_traits::value_type` is not the same as, or not derived from `TBase`. + +--- + +```cpp +template +ETL_CONSTEXPR poly_span(U(&begin_)[N]) ETL_NOEXCEPT +``` +**Description** +Static asserts if `N` is greater than `Extent` or `etl::iterator_traits::value_type` is not the same as, or not derived from `TBase`. + +--- + +```cpp +template +ETL_CONSTEXPR poly_span(etl::array& a) ETL_NOEXCEPT +``` +**Description** +Static asserts if `N` is greater than `Extent` or `etl::iterator_traits::value_type` is not the same as, or not derived from `TBase`. + +--- + +```cpp +template +ETL_CONSTEXPR poly_span(const etl::array& a) ETL_NOEXCEPT +``` +**Description** +Static asserts if `N` is greater than `Extent` or `etl::iterator_traits::value_type` is not the same as, or not derived from `TBase`. + +--- + +```cpp +template +ETL_CONSTEXPR poly_span(std::array& a) ETL_NOEXCEPT +``` +**Description** +Enabled if `ETL_USING_CPP11` and `ETL_USING_STL` are `true`. +Static asserts if `N` is greater than `Extent` or `etl::iterator_traits::value_type` is not the same as, or not derived from `TBase`. + +--- + +```cpp +template +ETL_CONSTEXPR poly_span(const std::array& a) ETL_NOEXCEPT +``` +**Description** +Enabled if `ETL_USING_CPP11` and `ETL_USING_STL` are `true`. +Static asserts if `N` is greater than `Extent` or `etl::iterator_traits::value_type` is not the same as, or not derived from `TBase`. + +--- + +```cpp +ETL_CONSTEXPR poly_span(const poly_span& other) +``` +**Description** +Copy constructor. + +## Access + +```cpp +ETL_CONSTEXPR reference operator[](size_t i) const +``` +**Description** +Returns a reference to the indexed element. +Index out of range results in undefined behaviour. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR reference front() const ETL_NOEXCEPT +``` +**Description** +Returns a reference to the first element. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR reference back() const ETL_NOEXCEPT +``` +**Description** +Returns a reference to the last element. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR pointer data() const ETL_NOEXCEPT +``` +**Description** +Returns a pointer to the first element. + +--- + +```cpp +ETL_CONSTEXPR14 poly_span& operator =(const poly_span& other) ETL_NOEXCEPT +``` +**Description** +Assign from a other span + +--- + +```cpp +template +ETL_CONSTEXPR14 poly_span& operator =(const poly_span& other) ETL_NOEXCEPT +``` +**Description** +Assign from a other span. + +--- + +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR etl::poly_span first() const +``` +**Description** +Returns a span consisting of the first `COUNT` elements of the current span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR etl::poly_span last(size_t count) const +``` +**Description** +Returns a span consisting of the last count elements of the current span. + +--- + +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR etl::poly_span last() const +``` +**Description** +Returns a span consisting of the last `COUNT` elements of the current span + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR etl::poly_span first(size_t count) const +``` +**Description** +Returns a span consisting of the first count elements of the current span. + +--- + +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR etl::poly_span subspan() const +``` +**Description** +Returns a subspan consisting of the range starting at `OFFSET` for `COUNT` elements of the current span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR etl::poly_span subspan(size_t offset, size_t count = etl::dynamic_extent) const +``` +**Description** +Returns a subspan consisting of the range starting at `offset` for `count` elements of the current span. + +## Iterators + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator begin() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the beginning of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator end() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the end of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator rbegin() const ETL_NOEXCEPT +``` +**Description** +Returns a reverse iterator to the beginning of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator rend() const ETL_NOEXCEPT +``` +**Description** +Returns a reverse iterator to the end of the span. + +## Capacity + +```cpp +ETL_NODISCARD ETL_CONSTEXPR bool empty() const ETL_NOEXCEPT +``` +**Description** +Returns true if the size of the span is zero, otherwise false. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR size_t size() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR size_t size_bytes() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the span in bytes. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR size_t size_of_element() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the elements pointed to by the span, in bytes. + +## Non-member functions + +### Hash +There is a specialisation of `etl::hash` for `etl::poly_span`. + +--- + +### Example +```cpp +struct Base +{ + virtual ~Base() {} + virtual void Print() const = 0; +}; + +struct Derived : Base +{ + Derived(int i_) + : i(i_) + { + } + + void Print() const override + { + std::cout << "Derived " << i << "\n"; + } + + int i; +}; + +etl::array data{ Derived(1), Derived(2), Derived(3), Derived(4) }; + +etl::poly_span ps{ data }; + +for (const Base& b : ps) +{ + b.Print(); +} +``` diff --git a/docs/containers/Views/span.md b/docs/containers/Views/span.md new file mode 100644 index 00000000..8fb131f7 --- /dev/null +++ b/docs/containers/Views/span.md @@ -0,0 +1,410 @@ +--- +title: "span" +--- + +{{< callout >}} + Header: `span.h` + Similar to: `std::span` +{{< /callout >}} + +This class implements a view in to a range of a C array, `etl::array`, `std::array`, `etl::vector` and `std::vector`. +It will support construction from any class that supports `data()` and `size()` member functions as well as plain C arrays. + +From: `20.34.0` +The ETL's span adds the ability to access circular iterators that will loop through the span when the beginning or end is reached. + +```cpp +etl::span +``` + +## Template deduction guides +C++17 + +```cpp +template +span(const TIterator begin, const TIterator end) + ->span, etl::dynamic_extent>; +``` + +```cpp +template +span(const TIterator begin, const TSize size) + ->span, etl::dynamic_extent>; +``` + +```cpp +template +span(T(&)[N]) + -> span; +``` + +```cpp +template +span(etl::array&) + -> span; +``` + +```cpp +template +span(const etl::array&) + -> span; +``` + +```cpp +template +span(std::array&) + ->span; +``` + +```cpp +template +span(const std::array&) + ->span; +``` + +### Examples +```cpp +etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + +etl::span span1{ data }; +etl::span span2{ data.begin(), data.end() }; +etl::span span3{ data.begin(), data.size() }; +etl::span span4{ span1 }; + +int c_array[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +etl::span span5{ c_array }; +``` + +## Member types + +```cpp +element_type T +value_type remove_cv::type +size_type size_t +difference_type ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator A random access iterator +reverse_iterator A reverse random access iterator +circular_iterator A circular random access iterator 20.34.0 +circular_reverse_iterator A reverse circular random access iterator 20.34.0 +``` + +## Constructors + +```cpp +ETL_CONSTEXPR span() +``` +**Description** +Default constructor. + +--- + +```cpp +template +ETL_CONSTEXPR span(TIterator begin, TIterator end) +``` +**Description** +Construct from an iterator or pointer range. + +--- + +```cpp +template +ETL_CONSTEXPR span(TIterator begin, TSize size) +``` +**Description** +Construct from a start and size + +--- + +```cpp +template +ETL_CONSTEXPR explicit span(element_type(&begin)[ARRAY_SIZE]) +``` +**Description** +Construct from a compile time sized C array. + +--- + +```cpp +template +ETL_CONSTEXPR span(etl::array& a) ETL_NOEXCEPT +``` +**Description** +Construct from an ETL array. + +--- + +```cpp +template +ETL_CONSTEXPR span(const etl::array& a) ETL_NOEXCEPT +``` +**Description** +Construct from a const ETL array. + +--- + +```cpp +template +ETL_CONSTEXPR span(std::array& a) ETL_NOEXCEPT +``` +**Description** +Enabled if `ETL_USING_CPP11` and `ETL_USING_STL` are `true`. +Construct from an STL array. + +--- + +```cpp +template +ETL_CONSTEXPR span(const std::array& a) ETL_NOEXCEPT +``` +**Description** +Enabled if `ETL_USING_CPP11` and `ETL_USING_STL` are `true`. +Construct from a const STL array. + +--- + +```cpp +ETL_CONSTEXPR span(const span& other) ETL_NOEXCEPT +``` +**Description** +Copy constructor. + +--- + +```cpp +template +ETL_CONSTEXPR span(const etl::span& other) ETL_NOEXCEPT +``` + +## Access + +```cpp +ETL_CONSTEXPR reference operator[](size_t i) const +``` +**Description** +Returns a reference to the indexed element. +Index out of range results in undefined behaviour. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR reference front() const ETL_NOEXCEPT +``` +**Description** +Returns a reference to the first element. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR reference back() const ETL_NOEXCEPT +``` +**Description** +Returns a reference to the last element. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR pointer data() const ETL_NOEXCEPT +``` +**Description** +Returns a pointer to the first element. + +--- + +```cpp +ETL_CONSTEXPR14 span& operator =(const span& other) ETL_NOEXCEPT +``` +**Description** +Assign from a other span + +--- + +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR etl::span first() const +``` +**Description** +Returns a span consisting of the first `COUNT` elements of the current span + +--- + +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR etl::span last() const +``` +**Description** +Returns a span consisting of the last `COUNT` elements of the current span + +--- + +```cpp +template +ETL_NODISCARD ETL_CONSTEXPR etl::span subspan() const +``` +**Description** +Returns a subspan consisting of the range starting at `OFFSET` for `COUNT` elements of the current span + +## Iterators + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator begin() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the beginning of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR circular_iterator begin_circular() const ETL_NOEXCEPT +``` +**Description** +Returns a circular iterator to the beginning of the span. +From: `20.34.0` + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator end() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the end of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator rbegin() const ETL_NOEXCEPT +``` +**Description** +Returns a reverse iterator to the beginning of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR reverse_circular_iterator rbegin_circular() const ETL_NOEXCEPT +``` +**Description** +Returns a reverse circular iterator to the beginning of the span. +From: `20.34.0` + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR iterator rend() const ETL_NOEXCEPT +``` +**Description** +Returns a reverse iterator to the end of the span. + +## Capacity + +```cpp +ETL_NODISCARD ETL_CONSTEXPR bool empty() const ETL_NOEXCEPT +``` +**Description** +Returns `true` if the size of the span is zero, otherwise `false`. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR size_t size() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the span. + +--- + +```cpp +ETL_NODISCARD ETL_CONSTEXPR size_t size_bytes() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the span in bytes. + +## Non-member functions + +```cpp +template +ETL_NODISCARD +ETL_CONSTEXPR +bool operator ==(const etl::span& lhs, const etl::span& rhs) ETL_NOEXCEPT +``` +**Description** +Compare two spans for equality. +Returns true if they both point to the same range of data. +From: `20.35.12` + +--- + +```cpp +template +ETL_NODISCARD +ETL_CONSTEXPR +bool operator !=(const etl::span& lhs, const etl::span& rhs) ETL_NOEXCEPT +``` +**Description** +Compare two spans for inequality. +Returns true if they don't both point to the same range of data. +From: `20.35.12` + +--- + +```cpp +template +bool equal(const etl::span& lhs, const etl::span& rhs) +``` +**Description** +Equality function. +Performs a comparision 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. +3. The values in the two ranges are equal. + +From: `20.35.12` + +## Hash +There is a specialisation of etl::hash for etl::span + +### Example + +**Iterating through a span and subspan.** + +```cpp +etl::array data = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; +using View = etl::span; +View view(data.begin() + 2, data.end() - 2); + +void Print(const View& view) +{ + for (size_t i = 0; i < view.size(); ++i) + { + std::cout << view[i] << " "; + } +} + +Print(view); // Prints "3 4 5 6 7 8" + +auto subview = view.subspan<2, 3>(); + +Print(subview); // Prints "5 6 7" + +size_t hashvalue = etl::hash()(view); +``` + +**Looping a span.** + +```cpp +etl::array data = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; +using View = etl::span; +View view(data.begin(), data.end()); + +View::circular_iterator itr = view.begin_circular(); + +// Loop through the data for 1000 iterations. +for (int i; i < 1000; ++i) +{ + Print(*itr++); +} +``` diff --git a/docs/containers/_index.md b/docs/containers/_index.md new file mode 100644 index 00000000..20c8c138 --- /dev/null +++ b/docs/containers/_index.md @@ -0,0 +1,66 @@ +--- +title: "Containers" +weight: 100 +--- + +## Containers +The library defines a set of containers that have been specially tailored for embedded systems. They have a maximum capacity fixed at compile time and make no calls to `malloc`/`free` or `new`/`delete`. They are completely deterministic. + +Most container types have been designed to mimic, as far as possible, those found in the STL. Some do not have direct STL equivalents. + +As the storage for all of the container types is allocated as a contiguous block, they are extremely cache friendly. + +**Note:** +Unlike the STL, the ETL's `vector` really *is* a container and actually *does* contains `bool`. +If you require a compact Boolean container then `etl::bitset` may be more appropriate. + +## Intrusive containers +There are intrusive versions of certain containers. These do not store copies of the inserted values, but link to the original objects. Certain types of intrusive container require that the stored object derives from an intrusive link. + +Most intrusive containers do not have a maximum fixed capacity. +See here for more information. + +To eliminate code bloat, most container templates utilise 'hoisting' where functionality, independent of the size and/or type, is separated out in to base classes. + +For example, `vector` and `vector` will share code from `ivector`. +`vector`, `vector` and `vector` will all share code from `vector_base`. + +The `i` prefixed container types may be used as size independent pointer or reference types for all sizes of thederived type. + +```cpp +etl::vector vector1; +etl::vector vector2; + +etl::ivector* pvector; + +pvector = &vector1;pvector->push_back(3); +pvector = &vector2;pvector->push_back(4); +``` + +## Move semantics and rvalue references +The following containers support rvalue references and move semantics. + +`vector` +`deque` +`list` +`forward_list` +`flat_set` +`flat_multiset` +`flat_map` +`flat_multimap` + +*This list may be out of date*. + +## Differences from the STL containers +As the containers have a fixed capacity, most also implement `full()` and `available()` member functions. + +Most of the containers allocate their storage from an internal instance of `etl::pool`. +Because of this the containers have a certain set of attributes that differ from the standard library. +- The storage for all containers is contiguous, thereby enhancing cache hits. +- No heap memory is used; no OS or user supplied memory management is required. +- Non-static containers declared locally within functions will store their contents on the stack. +- Copying or swapping a container is not a low cost action, as all of the contents will be copied. + +## Notes +Although the containers utilise inheritance, like the STL containers, they are not intended to be used +polymorphically, unless enabled by a compile time macros `ETL_POLYMORPHIC_XXX`. diff --git a/docs/containers/arrays/_index.md b/docs/containers/arrays/_index.md new file mode 100644 index 00000000..f82dabdd --- /dev/null +++ b/docs/containers/arrays/_index.md @@ -0,0 +1,6 @@ +--- +title: "Arrays" +weight: 100 +--- + +Array like containers. \ No newline at end of file diff --git a/docs/containers/arrays/array.md b/docs/containers/arrays/array.md new file mode 100644 index 00000000..e2cda55d --- /dev/null +++ b/docs/containers/arrays/array.md @@ -0,0 +1,316 @@ +--- +title: "array" +weight: 1 +--- + +{{< callout >}} + Header: `array.h` + Since: All versions + Similar to: [std::array](https://en.cppreference.com/w/cpp/container/array.html) +{{< /callout >}} + +A fixed capacity array. +Adds additional members functions, `assign`, `insert` & `erase`. + +```cpp +etl::array +``` + +See also: +[array_view]({{< relref "array-view" >}}) +[multi_array]({{< relref "multi-array" >}}) + +## Template deduction guides +**C++17 and above** + +```cpp +template +etl::array(T...) +``` + +### Example +```cpp +etl::array data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +``` +Defines data as an array of 'int', of length '10', containing the supplied data. + +## Make template +**C++11 and above** + +```cpp +template +constexpr auto make_array(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); +``` + +## Member types + +`value_type` +`size_type` +`difference_type` +`reference` +`const_reference` +`pointer` +`const_pointer` +`iterator` +`const_iterator` +`reverse_iterator` +`const_reverse_iterator` + +`etl::array` iterators are random access. + +## Static Constants + +```cpp +SIZE +``` +**Description** +The size of the array. + +## Constructor + +```cpp +etl::array data = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +``` +**Description** +Default or copy constructs each element. +Can be initialised like a C array. + +## Element access +```cpp +T& at(size_t i) +const T& at(size_t i) const +``` +**Description** +Returns a reference or const reference to the indexed element. Emits an etl::array_out_of_range if the index is not in range. +If asserts or exceptions are not enabled then an out of range index results in undefined behaviour. + +--- + +```cpp +T& operator[](size_t i) +const T& operator[](size_t i) const +``` +**Description** +Returns a reference or const reference to the indexed element. +An out of range index results in undefined behaviour. + +--- + +```cpp +T& front() +const T& front() const +``` +**Description** +Returns a reference or const reference to the first element. + +--- + +```cpp +T& back() +const T& back() const +``` +**Description** +Returns a reference or const reference to the last element. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the array. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the array. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the array. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the array. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns true if the size of the array is zero, otherwise false. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the array. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the array. + +## Modifiers + +```cpp +void fill(T value) +``` +**Description** +Fills the array with value. + +## ETL Extensions + +```cpp +template +void assign(TIterator first, const TIterator last) +``` + +```cpp +template +void assign(TIterator first, const TIterator last, parameter_t value) +``` + +**Description** +Assigns a range of values to the array. The second form set uninitialised elements to value. +If the range is larger than the array then the extra data is ignored. +If the range is smaller than the array then the unused array elements are left unmodified. + +--- + +```cpp +iterator insert_at(size_t position, parameter_t value) +iterator insert(const_iterator position, parameter_t value) +``` + +**Description** +Inserts a value into the array at the specified position, shifting elements to make room. +Elements may be truncated if they are shifted off the end of the array. + +--- + +```cpp +template +iterator insert_at(size_t position, TIterator first, const TIterator last) +``` + +**Description** +`position` is not checked for validity. + +--- + +```cpp +template +iterator insert(const_iterator position, TIterator first, const TIterator last) +``` + +**Description** +Inserts a range of values into the array at the specified position, shifting elements to make room. +Elements may be truncated if they are shifted off the end of the array. +The range may be larger than the capacity of the array. Excess elements will be ignored. + +--- + +```cpp +iterator erase_at(size_t position) +iterator erase_at(size_t position, parameter_t value) +iterator erase(const_iterator position) +iterator erase(const_iterator position, parameter_t value) +``` + +**Description** +Erases an element at the specified position, shifting elements into the space. +The value parameter variants initialise the unused elements with value, while the others leave them unchanged. +position is not checked for valid range. + +--- + +```cpp +iterator erase_range(size_t first, size_t last) +iterator erase_range(size_t first, size_t last, parameter_t value) +iterator erase(const_iterator first, const_iterator last) +iterator erase(const_iterator first, const_iterator last, parameter_t value) +``` + +**Description** +Erases a range, shifting elements into the space. +The value parameter variants initialise the unused elements with value, while the others leave them unchanged. +first/last are not checked for valid range. + +## Non-member functions +**Lexicographically comparisons** +```cpp +operator == +``` +**Description** +`true` if the contents of the lists are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the lists are not equal, otherwise `false`. + +--- + +```cpp +operator < +``` +**Description** +`true` if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator <= +``` +**Description** +`true` if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator > +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator >= +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`. diff --git a/docs/containers/arrays/multi-array.md b/docs/containers/arrays/multi-array.md new file mode 100644 index 00000000..65288cc4 --- /dev/null +++ b/docs/containers/arrays/multi-array.md @@ -0,0 +1,39 @@ +--- +title: "multi_array" +weight: 2 +--- + +{{< callout >}} + Header: `multi_array.h` +{{< /callout >}} + +A fixed capacity multi-dimensional array. + +For C++11 or greater only. + +```cpp +etl::multi_array +``` + +See also: +[array]({{< relref "array" >}}) +[array_view]({{< relref "array-view" >}}) + +## Description + +The `etl::multi_array` class is defined as a recursive variadic template. +It defines a multi-dimensional array class based on nested `etl::array` definitions. + +## Example + +```cpp +etl::multi_array +``` + +is equivalent to + +```cpp +etl::array, 3>, 2> +``` + +Each dimension of an `etl::multi_array` supports all of the members of an `etl::array`. diff --git a/docs/containers/binary/_index.md b/docs/containers/binary/_index.md new file mode 100644 index 00000000..43f202a7 --- /dev/null +++ b/docs/containers/binary/_index.md @@ -0,0 +1,6 @@ +--- +title: "Binary" +weight: 100 +--- + +Binary like containers. \ No newline at end of file diff --git a/docs/containers/binary/bitset.md b/docs/containers/binary/bitset.md new file mode 100644 index 00000000..f853ef65 --- /dev/null +++ b/docs/containers/binary/bitset.md @@ -0,0 +1,420 @@ +--- +title: "bitset" +--- + +{{< callout >}} + Header: `bitset.h` + Since: 20.33.0 + Similar to: [std::bitset](https://en.cppreference.com/w/cpp/utility/bitset.html) +{{< /callout >}} + +This is the new default bitset implementation, from 20.33.0 onwards. +For the older version, see [etl::bitset (legacy)](). + +A fixed capacity bitset. +Has a number of extensions over `std::bitset`. Can be considered similar to an array of `bool`. + +Internally defined buffers +```cpp +etl::bitset +etl::bitset +``` + +Externally defined buffers from `20.34.0` +```cpp +etl::bitset_ext +etl::bitset_ext +``` + +The template parameters will determine whether the bitset uses a common implementation or one of four fixed sized +implementations. + +Note: `etl::ibitset` is no longer a reference type for any size `etl::bitset`. + +--- + +`etl::bitset` and `etl::bitset_ext` on their own will use `unsigned char` as the underlying element type and the operations will be implemented by the generic protected member functions in `etl::ibitset`. + +--- + +```cpp +etl::bitset +``` +```cpp +etl::bitset_ext +``` +Specifying a type for `TElement` will override the default element type and define it as the *unsigned* type of `TElement`. + +**Specialisations for maximum efficiency** + +There are specialisations for when the required number of bits matches the number of bits in the element type. +These specialisations are considerably faster and more efficient. + +```cpp +etl::bitset<8, uint8_t> +etl::bitset<16, uint16_t> +etl::bitset<32, uint32_t> +etl::bitset<8, uint64_t> +``` + +`any()`, `none()` and `all()` are overloaded in these specialisations to allow a mask to be specified, so that a bitset that requires less bits than the element type may still use the most efficient implementation. + +```cpp +etl::bitset<8, uint8_t> bst; // But only want to use 6 bits. +bool any = bst.any(0x3F); // Check the lower 6 bits. +``` + +## Types + +| Type | | +| - | - | +|`span_type` | A mutable span type. | +|`const_span_type`| A non-mutable span type. | +|`element_type` | The type used as the internal storage for a bitset. By default, this is unsigned char. | +|`buffer_type` | The type used as the to define the external buffer. Defined in `etl::bitset_ext` only. `20.34.0` | + +## Constants + +All `npos` values are equivalent. +```cpp +etl::bitset_constants::npos +``` +```cpp +etl::bitset<>::npos +``` +```cpp +template +etl::bitset::npos +``` +`Number_Of_Elements` +`Bits_Per_Element` +`Allocated_Bits` +`All_Set_Element` +`All_Clear_Element` + +From: 20.38.11 +`Storage_Model` `etl::bitset_storage_model::Single` or `etl::bitset_storage_model::Multi` + +## Constructors + +The initial state of the bitset is all clear (`false`). + +```cpp +etl::bitset(); +etl::bitset(unsigned long value); +etl::bitset(const char* str); +etl::bitset(const wchar_t* str); +etl::bitset(const char16_t* str); +etl::bitset(const char32_t* str); +``` +**Description** +The bitset is either default constructed, initialised with a numeric value, or a text string of zeros and ones. + +--- + +```cpp +etl::bitset_ext(element_type* pbuffer); +etl::bitset_ext(unsigned long value, element_type* pbuffer); +etl::bitset_ext(const char* str, element_type* pbuffer); +etl::bitset_ext(const wchar_t* str, element_type* pbuffer); +etl::bitset_ext(const char16_t* str, element_type* pbuffer); +etl::bitset_ext(const char32_t* str, element_type* pbuffer); +``` +**Description** +The bitset is either default constructed, initialised with a numeric value, or a text string of zeros and ones. +A pointer to an external must be supplied that is large enough to hold the bitset. +The buffer may be defined as follows:- +```cpp +using Bitset = etl::bitset_ext<32>; + +Bitset::element_type buffer[Bitset::Number_Of_Elements]; +``` +From: 20.34.0 + +--- + +```cpp +etl::bitset_ext(buffer_type& buffer); +etl::bitset_ext(unsigned long value, buffer_type& buffer); +etl::bitset_ext(const char* str, buffer_type& buffer); +etl::bitset_ext(const wchar_t* str, buffer_type& buffer); +etl::bitset_ext(const char16_t* str, buffer_type& buffer); +etl::bitset_ext(const char32_t* str, buffer_type& buffer); +``` +**Description** +The bitset is either default constructed, initialised with a numeric value, or a text string of zeros and ones. +An external buffer must be supplied that is large enough to hold the bitset. +The buffer may be defined as follows:- +```cpp +using Bitset = etl::bitset_ext<32>; + +Bitset::buffer_type buffer; +``` +From: 20.34.0 + +## Modifiers + +```cpp +etl::bitset& set(); +``` +**Description** +Set all bits. + +--- + +```cpp +etl::bitset& set(element_type value); +``` +**Description** +Set the bits to `value`. +Valid when the bitset width matches the element type width. +From: `20.34.0` + +--- + +```cpp +etl::bitset& set(const char* str); +etl::bitset& set(const wchar_t* str); +etl::bitset& set(const char16_t* str); +etl::bitset& set(const char32_t* str); +``` +**Description** +Set with a text string of `0` and `1` characters. + +--- + +```cpp +etl::bitset& set(size_t position, bool value = true); +``` +**Description** +Set a position to a one or zero, default one. + +--- + +```cpp +etl::bitset& reset(); +``` +**Description** +Reset all bits. + +--- + +```cpp +etl::bitset& reset(size_t position); +``` +**Description** +Set a position to a zero. + +--- + +```cpp +etl::bitset& from_string(const char*); +etl::bitset& from_string(const wchar_t*); +etl::bitset& from_string(const char16_t*); +etl::bitset& from_string(const char32_t*); +``` +**Description** +Alias of set. +The bitset is built from a string of `0` and `1` characters. + +## Access + +```cpp +template +T value() const +``` +**Description** +Returns the value corresponding to the bitset. +`T` specifies the integral type to convert to. + +--- + +```cpp +unsigned long to_ulong() const +unsigned long long to_ullong() const +``` +**Description** +Functions for compatibility with the STL. +Calls value() or value(). + +If the type is too small to contain the bitset size, a compile time error will result. + +--- + +```cpp +template +TString to_string(typename TString::value_type zero = typename TString::value_type('0'), + typename TString::value_type one = typename TString::value_type('1')) const +``` +Returns the value as a string of `0` and `1` characters. +If the string type is not large enough to contain the digits then an `etl::bitset_string_too_small` is emitted. + +--- + +```cpp +span_type span() +const_span_type span() const +``` +**Description** +Returns an `etl::span` of the underlying binary data. +The span is ordered LSB to MSB. + +--- + +```cpp +template +ETL_CONSTEXPR14 +T extract(size_t position, size_t length = etl::integral_limits::bits) const +``` +**Description** +Extract an integral value from an arbitrary position and length. +Run time position and length. + +--- + +```cpp +template ::bits> +ETL_CONSTEXPR14 +T extract() const +``` +**Description** +Extract an integral value from an arbitrary position and length. +Compile time position and length. +From: 20.38.11 +For C++11 and above + +--- + +```cpp +template +T extract() const +``` +**Description** +Extract an integral value from an arbitrary position and length. +Compile time position and length. +From: `20.38.11` +For C++98/03 + +## Bit access + +```cpp +bool operator[](size_t position) const +``` +**Description** +Returns the boolean state of the indexed bit. +position is not checked for validity. + +--- + +```cpp +size_t count() const +``` +**Description** +Returns the number of set bits. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the number of bits supported by this bitset. + +--- + +```cpp +bool test(size_t position) const +``` +**Description** +Returns the boolean state of the indexed bit. +position is not checked for validity. + +--- + +```cpp +bool any() const +``` +**Description** +Returns true if any of the bits are set, otherwise false. + +```cpp +bool any(element_type mask) const +``` +**Description** +Only enabled for bitsets that fit within one element. +Returns `true` if any of the bits are set, after the mask has been applied, otherwise `false`. +Valid when the bitset width matches the element type width. +From: `20.34.0` + +--- + +```cpp +bool none() const +``` +**Description** +Returns true if none of the bits are set, otherwise false. + +```cpp +bool none(element_type mask) const +``` +**Description** +Only enabled for bitsets that fit within one element. +Returns `true` if none of the bits are set, after the mask has been applied, otherwise `false`. +Valid when the bitset width matches the element type width. +From: `20.34.0` + +--- + +```cpp +bool all() const +``` +**Description** +Returns `true` if al of the bits are set, otherwise `false`. + +```cpp +bool all(element_type mask) const +``` +**Description** +Only enabled for bitsets that fit within one element. +Returns `true` if al of the bits are set, after the mask has been applied, otherwise `false`. +Valid when the bitset width matches the element type width. +From: `20.34.0` + +--- + +```cpp +size_t find_first(bool state) const +``` +**Description** +Returns the position of the first bit in the specified state. If not found then returns `bitset<>::npos`. + +--- + +```cpp +size_t find_next(bool state, size_t position) const +``` +**Description** +Returns the position of the next bit in the specified state, starting from position. If not found then returns `bitset<>::npos`. +`position` is not checked for validity. + +## Bit operations + +```cpp +bitset& operator &= (const bitset& rhs); +bitset& operator |= (const bitset& rhs); +bitset& operator ^= (const bitset& rhs); +bitset& operator <<= (size_t shift); +bitset& operator >>= (size_t shift); +bool operator == (const bitset& rhs); +bool operator != (const bitset& rhs); +``` + +## Non-member functions + +```cpp +void swap(etl::bitset& lhs, etl::bitset& rhs) +``` +**Description** +Swaps the contents of the two bitsets. +The bitsets must be the same size. + diff --git a/docs/containers/binary/bloom-filter.md b/docs/containers/binary/bloom-filter.md new file mode 100644 index 00000000..56a7d671 --- /dev/null +++ b/docs/containers/binary/bloom-filter.md @@ -0,0 +1,106 @@ +--- +title: "bloom_filter" +--- + +{{< callout >}} + Header: `bloom_filter.h` + Since: All versions +{{< /callout >}} + +```cpp +etl::bloom_filter +``` + +A Bloom filter that supports up to three hash functions. `Thash2` & `Thash3` are optional. + +The width specified is the desired width in bits. +The class may use more if the underlying bitset naturally has spare capacity. +i.e. A bloom filter with a specified capacity of 195 bits will be rounded up to 200 bits as the bitset has a block size of 8. + +## Constructor + +The initial state of the Bloom filter is clear. + +```cpp +bloom_filter(); +``` + +## Operations + +```cpp +void clear() +``` +**Description** +Clears the filter of all entries. + +--- + +```cpp +void add(parameter_t key) +``` +**Description** +Adds a key to the filter, where `parameter_t` is derived from the first hash argument type. + +--- + +```cpp +bool exists(parameter_t key) const +``` +**Description** +Checks to see if a key may exist in the filter, where `parameter_t` is derived from the first hash argument type. + +--- + +```cpp +size_t usage() const +``` +**Description** +Returns the usage of the filter in percent. +Equal to `100 * count() / width()` + +--- + +```cpp +size_t count() const +``` +**Description** +Returns the number of elements in use in the filter. + +--- + +```cpp +size_t width() const +``` +**Description** +Returns the width of the filter. +Equal to the template parameter WIDTH. + +## Example + +```cpp +#include "bloom_filter.h" +#include "fnv-1.h" +#include "string.h" + +struct hash_t +{ + typedef const char* argument_type; + + size_t operator ()(argument_type text) const + { + return etl::fnv_1a_32(text, text + strlen(text)); + } +}; + +etl::bloom_filter<64, hash_t> bloom; + +bloom.add("Hello"); +bloom.add("World"); +bloom.add("the"); + +bool test; + +test = bloom.exists("Hello"); // Returns true +test = bloom.exists("You"); // Returns false +test = bloom.exists("you"); // Returns true (false positive) +``` diff --git a/docs/containers/lists/_index.md b/docs/containers/lists/_index.md new file mode 100644 index 00000000..deeebe4f --- /dev/null +++ b/docs/containers/lists/_index.md @@ -0,0 +1,6 @@ +--- +title: "Lists" +weight: 100 +--- + +List like containers. \ No newline at end of file diff --git a/docs/containers/lists/forward-list.md b/docs/containers/lists/forward-list.md new file mode 100644 index 00000000..2be721e0 --- /dev/null +++ b/docs/containers/lists/forward-list.md @@ -0,0 +1,533 @@ +--- +title: "forward_list" +weight: 3 +--- + +{{< callout >}} + Header: `forward_list.h` + Similar to: `std::forward_list` +{{< /callout >}} + +A fixed capacity forward list. + +```cpp +etl::forward_list +etl::forward_list_ext +``` + +Inherits from `etl::iforward_list`. +`etl::iforward_list` may be used as a size independent pointer or reference type for any `etl::forward_list` instance. + +**Note:** Does not support the member function swap. + +## Shared Pools + +`etl::forward_list_ext` +This template may share pools with another `etl::forward_list` of the same type. +The list is initialised with the pool either at construction time or a call to `set_pool(etl::ipool& pool)`. +When pools are shared there are a few side effects that must be noted. + +`size()` and `empty()` will be O(N) complexity. For a normal `etl::forward_list` they are O(1). + +Destruction of the container will always be O(N) regardless of whether the type store is trivially destructible or not. + +`max_size()` will return the potential maximum size of the list. The actual maximum size will dependent of how many elements the other lists sharing the pool have allocated. + +Pool must be declared with the list's `pool_type`. + +### Example +```cpp +// The element type +struct Point { int x; int y; }; + +// The list type +using List = etl::forward_list_ext; + +// The shared pool +etl::pool pool; +``` + +## Template deduction guides +**C++17 and above** + +```cpp +template +etl::forward_list(T...) +``` + +### Example +```cpp +etl::forward_list data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +``` + +Defines data as an `forward_list` of int, of length 10, containing the supplied data. + +## Make template +**C++11 and above** +```cpp +template + constexpr auto make_forward_list(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_forward_list(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); +``` + +## Member types + +```cpp +value_type T +size_type std::size_t +difference_type std::ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator Forward iterator +const_iterator Constant forward iterator +``` + +## Constructors + +```cpp +etl::forward_list() +``` + +--- + +```cpp +etl::forward_list(size_t initialSize, parameter_t value = T()) +``` + +--- + +```cpp +template +etl::forward_list(TIterator begin, TIterator end) +``` + +Raises an `etl::forward_list_iterator` if the iterators are invalid. Raises an `etl::forward_list_full` if the list becomes full. +If asserts or exceptions are disabled then undefined behaviour occurs. + +## For shared pool lists +```cpp +etl::forward_list(etl::pool& pool) +``` + +--- + +```cpp +etl::forward_list(size_t initialSize, parameter_t value, etl::pool& pool) +``` + +--- + +```cpp +template +etl::forward_list(TIterator begin, TIterator end, etl::pool& pool) +``` + +Raises an `etl::forward_list_iterator` if the iterators are invalid. If asserts or exceptions are disabled then undefined behaviour occurs. + +## Copy constructor +**Implicit pool** +Uses the pool from other. +```cpp +etl::forward_list(etl::forward_list& other) +``` + +**Explicit pool** +```cpp +etl::forward_list(etl::forward_list& other, etl::pool& pool) +``` + +## Element access + +```cpp +T& front() +const T& front() const +``` +**Description** +Returns a reference or const reference to the first element. +Undefined behaviour if the list is empty. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the forward list. +Returns end() if the list is empty. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the forward list. + +--- + +```cpp +iterator before_begin() +const_iterator before_begin() const +const_iterator cbefore_begin() const +``` +**Description** +Returns an iterator to before the beginning of the forward list. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the forward list is zero, otherwise `false`. + +--- + +```cpp +bool full() const +``` +**Description** +Returns `true` if the size of the forward list is SIZE, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the forward list. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the forward list. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the forward list . + +## Modifiers + +```cpp +template +void assign(TIterator begin, TIterator end) + +void assign(size_t n, parameter_t value) +``` +**Description** +Fills the forward list with the values. +Raises an `etl::forward_list_iterator` if the iterators are invalid. +Raises an `etl::forward_list_full` if the list becomes full. +If asserts or exceptions are disabled then undefined behaviour occurs. + +--- + +```cpp +void push_front(parameter_t value) +``` +**Description** +Pushes a value to the front of the forward list. If the forward list is full and ETL_CHECK_PUSH_POP is defined then raises an etl::forward_list_full error, otherwise undefined behaviour occurs. + +--- + +```cpp +emplace_front +``` +**Description** +Constructs an item at the front of the the list 'in place'. +If the forward list is full and `ETL_CHECK_PUSH_POP` is defined then raises an `etl::forward_list_full` error, otherwise undefined behaviour occurs. + +### C++03 +```cpp +template +void emplace_front(const T1& value1) + +template +void emplace_front(const T1& value1, const T2& value2) + +template +void emplace_front(const T1& value1, const T2& value2, + const T3& value3) + +template +void emplace_front(const T1& value1, const T2& value2, + const T3& value3, const T4& value4) +``` +Before: `20.35.0` + +## C++11 and above + +```cpp +template +void emplace_front(Args&& ... args) +``` +**Description** +Constructs an item at the front of the the list 'in place'. +If the forward list is full and `ETL_CHECK_PUSH_POP` is defined then raises an `etl::forward_list_full` error, otherwise undefined behaviour occurs. + +### C++03 +```cpp +template +reference emplace_front(const T1& value1) + +template +reference emplace_front(const T1& value1, const T2& value2) + +template +reference emplace_front(const T1& value1, const T2& value2, + const T3& value3) + +template +reference emplace_front(const T1& value1, const T2& value2, + const T3& value3, const T4& value4) +``` +From 20.35.10 +--- + +### C++11 and above +```cpp +template +reference emplace_front(Args&& …args) +``` + +--- + +```cpp +void pop_front() +``` +**Description** +Pop a value from the front of the forward list. +If the forward list is empty and `ETL_CHECK_PUSH_POP` is defined then raises an `etl::forward_list_empty` error, otherwise undefined behaviour occurs. + +--- + +```cpp +template +void insert_after(iterator position, TIterator begin, TIterator end) +``` +**Description** +Inserts the range [`begin`, `end`) into the forward list after the specified position. +Before: `20.20.0` + +--- + +```cpp +iterator insert_after(iterator position, parameter_t value) +void insert_after(iterator position, size_t n, parameter_t value) +``` +**Description** +Inserts `value` in to the forward list after the specified position. + +--- + +```cpp +template +iterator insert_after(const_iterator position, TIterator begin, TIterator end) +``` +**Description** +Inserts the range [`begin`, `end`) into the forward list after the specified position. +Since: `20.20.0` + +--- + +```cpp +iterator insert_after(const_iterator position, parameter_t value) +``` +**Description** +Inserts `value` in to the forward list after the specified position. + +--- + +```cpp +iterator insert_after(const_iterator position, size_t n, parameter_t value) +``` +Inserts values in to the forward list after the specified position. +If the forward list is full then raises an `etl::forward_list_full error`. +If asserts or exceptions are disabled then undefined behaviour occurs. + +--- + +```cpp +iterator erase_after(iterator position) +``` +Erases elements after the specified position. +Before: `20.20.0` + +--- + +```cpp +iterator erase_after(iterator position, const_iterator end) +``` +**Description** +Erases the range (`position`, `end`) +Before: `20.20.0` + +--- + +```cpp +iterator erase_after(const_iterator position) +``` +**Description** +Erases elements after the specified position. +Since: `20.20.0` + +--- + +```cpp +iterator erase_after(const_iterator position, const_iterator end) +``` +**Description** +Erases the range (`position`, `end`) +Since: `20.20.0` + +--- + +```cpp +void resize(size_t n) +``` +**Description** +Resizes the forward list. +If the new size is larger then the first assigns default constructed values. +If n is larger than the capacity then raises an `etl::forward_list_full error`, if asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +void resize(size_t n, parameter_t value) +``` +**Description** +Resizes the forward list. +If the new size is larger then the first assigns the supplied value. +If n is larger than the capacity then raises an `etl::forward_list_full error`, if asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +void clear() +``` +**Description** +Clears the forward list to a size of zero. + +## Operations + +```cpp +void remove(const T& value) +``` +**Description** +Removes from the container all the elements that compare equal to value. + +--- + +```cpp +template +void remove_if(TPredicate predicate) +``` +**Description** +Removes from the container all the elements that satisfy predicate. + +--- + +```cpp +void unique() +``` +**Description** +Removes all but the first element from every group of consecutive elements. + +--- + +```cpp +template +void unique(TPredicate predicate) +``` +**Description** +Removes all but the first element from every group of consecutive elements that satisfy the binary predicate. + +--- + +```cpp +void sort() +``` +**Description** +Sorts using the `<` operator. + +--- + +```cpp +template +void sort(TCompare compare) +``` +**Description** +Sorts using the supplied `compare` function. + +--- + +```cpp +void reverse() +``` +**Description** +Reverses the order of the container. + +## Non-member functions + +```cpp +operator == +``` +**Return** +`true` if the contents of the lists are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Return** +`true` if the contents of the lists are not equal, otherwise `false`. + +--- + +```cpp +operator < +``` +**Return** +`true` if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator <= +``` +**Return** +`true` if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator > +``` +**Return** +`true` if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator >= +``` +**Return** +`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`. diff --git a/docs/containers/lists/intrusive-forward-list.md b/docs/containers/lists/intrusive-forward-list.md new file mode 100644 index 00000000..5f1ee051 --- /dev/null +++ b/docs/containers/lists/intrusive-forward-list.md @@ -0,0 +1,321 @@ +--- +title: "intrusive_forward_list" +weight: 4 +--- + +{{< callout type="info">}} + Header: `intrusive_forward_list.h` + Similar to: `std::forward_list` +{{< /callout >}} + +An intrusive forward list.https://www.messenger.com/t/837634551/ + +```cpp +template +etl::intrusive_forward_list +``` + +`TValue` is the type that contains the actual values. It is derived from `Tlink`. `Tlink` is the link type for this list. +See Intrusive links. + +Before `20.37.0` the default link type was `etl::forward_link<0>`. + +## Member types + +```cpp +link_type TLink +value_type TValue +pointer value_type* +const_pointer const value_type* +reference value_type& +const_reference const value_type& +size_type size_t +``` + +## Constructors + +```pcc +etl::intrusive_forward_list(); +``` +**Description** +Default constructor. + +--- + +```cpp +template +etl::intrusive_forward_list(TIterator begin, TIterator end); +``` +**Description** +Creates the list from the range [`begin`, `end`) of node links. + +--- + +```cpp +template +intrusive_forward_list(TLink& first, TLinks&... links); +```cpp +**Description** +Creates the list from node link references. + +## Element access + +```cpp +TValue& front() +const T& front() const +``` +**Description** +Returns a reference or const reference to the first element. + +--- + +```cpp +TValue& back() +const T& back() const +``` +**Description** +Returns a reference or const reference to the last element. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the list. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the list. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns true if the size of the list is zero, otherwise false. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the list. + +## Modifiers + +```cpp +template +void assign(TIterator begin, TIterator end); +``` +**Description** +Fills the list with the values. + +--- + +```cpp +void push_front(value_type& value); +``` +**Description** +Pushes a value to the front of the list. + +--- + +```cpp +void pop_front(); +``` +**Description** +Pop a value from the front of the list. +Emits an `etl::intrusive_forward_list_empty` if the list is empty. +If asserts or exceptions are disabled then undefined behaviour occurs. + +--- + +```cpp +template +void insert_after(iterator position, TIterator begin, TIterator end); +``` +**Description** + +--- + +```cpp +iterator insert_after(iterator position, value_type& value); +``` +**Description** +Inserts values in to the list. +position is not checked for validity. + +--- + +```cpp +template +iterator erase_after(TIterator begin, TIterator end); +``` +**Description** +Erases values in the range [`begin`, `end`). +Iterators are not checked for validity. + +--- + +```cpp +iterator erase_after(iterator position); +``` +**Description** +Erases values in the list. +Iterators are not checked for validity. + +--- + +```cpp +void clear() +``` +**Description** +Clears the list to a size of zero. No elements are destructed. + +--- + +```cpp +void splice_after(iterator position, list_type& list); +void splice_after(iterator position, list_type& list, iterator isource); +void splice_after(iterator position, list_type& list, iterator begin_, iterator end_); +``` +**Description** +Splices elements from a list into this list. +Iterators are not checked for validity. + +--- + +```cpp +void merge(list_type& list); +``` +**Description** +Merges the sorted elements of 'list' into this list. Merges are stable. +If a debug compile and asserts or exceptions are enabled than an etl::intrusive_list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs. + +--- + +```cpp +template +void merge(list_type& list, Tcompare compare) +``` +**Description** +Merges the sorted elements of list into this list. Comparison functor is supplied in compare. Merges are stable. +If a debug compile and asserts or exceptions are enabled than an etl::intrusive_list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs. + +## Operations + +```cpp +void remove(const T& value); +``` +**Description** +Removes from the container all the elements that compare equal to value. + +--- + +```cpp +template +void remove_if(TPredicate predicate); +``` +**Description** +Removes from the container all the elements that satisfy predicate. + +--- + +```cpp +void unique(); +``` +**Description** +Removes all but the first element from every group of consecutive elements. + +--- + +```cpp +template +void unique(TPredicate predicate); +``` +**Description** +Removes all but the first element from every group of consecutive elements that satisfy the binary `predicate`. + +--- + +```cpp +void sort(); +``` +**Description** +Sorts using the < operator. + +--- + +```cpp +template +void sort(TCompare compare); +``` +**Description** +Sorts using the supplied `compare` function. + +--- + +```cpp +void reverse(); +``` +**Description** +Reverses the order of the list. + +## Non-member functions + +```cpp +operator == +``` +**Description** +`true` if the contents of the lists are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the lists are not equal, otherwise `false`. + +--- + +```cpp +operator < +``` +**Description** +`true` if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator <= +``` +**Description** +`true` if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator > +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator >= +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`. diff --git a/docs/containers/lists/intrusive-list.md b/docs/containers/lists/intrusive-list.md new file mode 100644 index 00000000..5d324c9e --- /dev/null +++ b/docs/containers/lists/intrusive-list.md @@ -0,0 +1,337 @@ +--- +title: "intrusive_list" +weight: 2 +--- + +{{< callout type="info">}} + Header: `intrusive_list.h` + Similar to: `std::list` +{{< /callout >}} + +An intrusive list. + +```cpp +template +etl::intrusive_list +``` + +`TValue` is the type that contains the actual values. It is derived from `Tlink`. `Tlink` is the link type for this list. +See Intrusive links. + +Before `20.37.0` the default link type was `etl::bidirectional_link<0>`. + +## Member types + +```cpp +link_type TLink +value_type TValue +pointer value_type* +const_pointer const value_type* +reference value_type& +const_reference const value_type& +size_type size_t +``` + +## Constructors + +```cpp +etl::intrusive_list() +``` +Default constructor. + +--- + +```cpp +template +etl::intrusive_list(TIterator begin, TIterator end) +``` +**Description** +Creates the list from the range [`begin`, `end`) of node links. + +--- + +```cpp +template +intrusive_list(TLink& first, TLinks&... links) +``` +**Description** +Creates the list from node link references. + +## Element access + +```cpp +TValue& front() +const T& front() const +``` +**Description** +Returns a reference or const reference to the first element. + +--- + +```cpp +TValue& back() +const T& back() const +``` +**Description** +Returns a reference or const reference to the last element. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the list. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the list. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the list is zero, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the list. + +## Modifiers + +```cpp +template +void assign(TIterator begin, TIterator end)) +``` +**Description** +Fills the list with the values. + +--- + +```cpp +void push_front(value_type& value)) +``` +**Description** +Pushes a value to the front of the list. + +--- + +```cpp +void push_back(value_type& value)) +``` +**Description** +Pushes a value to the back of the list. + +--- + +```cpp +void pop_front()) +``` +**Description** +Pop a value from the front of the list. +Emits an `etl::intrusive_list_empty` if the list is empty. +If asserts or exceptions are disabled then undefined behaviour occurs. + +--- + +```cpp +void pop_back()) +``` +**Description** +Pop a value from the back of the list. +Emits an `etl::intrusive_list_empty` if the list is empty. +If asserts or exceptions are disabled then undefined behaviour occurs. + +--- + +```cpp +template +void insert(iterator position, TIterator begin, TIterator end)) +``` +**Description** + +--- + +```cpp +iterator insert(iterator position, value_type& value)) +``` +**Description** +Inserts values in to the list. +position is not checked for validity. + +--- + +```cpp +template +iterator erase(TIterator begin, TIterator end)) +``` +**Description** +Erases the range [`begin`, `end`). + +--- + +```cpp +iterator erase(iterator position)) +``` +**Description** +Erases values in the list. +Iterators are not checked for validity. + +--- + +```cpp +void clear()) +``` +**Description** +Clears the list to a size of zero. No elements are destructed. + +--- + +```cpp +void splice(iterator position, list_type& list)) +void splice(iterator position, list_type& list, iterator isource)) +void splice(iterator position, list_type& list, iterator begin_, iterator end_)) +``` +**Description** +Splices elements from a list into this list. +Iterators are not checked for validity. + +--- + +```cpp +void merge(list_type& list)) +``` +**Description** +Merges the sorted elements of 'list' into this list. Merges are stable. +If a debug compile and asserts or exceptions are enabled than an etl::intrusive_list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs. + +--- + +```cpp +template +void merge(list_type& list, Tcompare compare)) +``` +**Description** +Merges the sorted elements of list into this list. Comparison functor is supplied in compare. Merges are stable. +If a debug compile and asserts or exceptions are enabled than an etl::intrusive_list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs. + +## Operations + +```cpp +void remove(const T& value)) +``` +**Description** +Removes from the container all the elements that compare equal to value. + +--- + +```cpp +template +void remove_if(TPredicate predicate)) +``` +**Description** +Removes from the container all the elements that satisfy predicate. + +--- + +```cpp +void unique()) +``` +**Description** +Removes all but the first element from every group of consecutive elements. + +--- + +```cpp +template +void unique(TPredicate predicate)) +``` +**Description** +Removes all but the first element from every group of consecutive elements that satisfy the binary predicate. + +--- + +```cpp +void sort()) +``` +**Description** +Sorts using the `<` operator. + +--- + +```cpp +template +void sort(TCompare compare)) +``` +**Description** +Uses the supplied `compare` function. + +--- + +```cpp +void reverse()) +``` +**Description** +Reverses the order of the list. + +## Non-member functions + +```cpp +operator == +``` +**Description** +`true` if the contents of the lists are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the lists are not equal, otherwise `false`. + +--- + +```cpp +operator < +``` +**Description** +`true` if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator <= +``` +**Description** +`true` if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator > +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator >= +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`. diff --git a/docs/containers/lists/list.md b/docs/containers/lists/list.md new file mode 100644 index 00000000..8ae13fd3 --- /dev/null +++ b/docs/containers/lists/list.md @@ -0,0 +1,753 @@ +--- +title: "list" +weight: 1 +--- + +{{< callout >}} + Header: `list.h` + Similar to: `std::list` +{{< /callout >}} + +A fixed capacity bidirectional list. + +```cpp +etl::list +etl::list_ext +``` + +Inherits from `etl::ilist`. +`etl::ilist` may be used as a size independent pointer or reference type for any `etl::list` instance. + +{{< callout type="warning">}} + Does not support the member function `swap`. +{{< /callout >}} + +## Shared Pools + +```cpp +etl::list +``` +This template may share pools with another `etl::list` of the same type. +The list is initialised with the pool either at construction time or a call to `set_pool(etl::ipool& pool)`. +When pools are shared there are a few side effects that must be noted. + +`size()` and `empty()` will have O(N) complexity. +For a normal `etl::list` they are O(1). + +Destruction of the container will always be O(N) regardless of whether the type store is trivially destructible or not. + +`max_size()` will return the potential maximum size of the list. The actual maximum size will dependent of how many elements the other lists sharing the pool have allocated. + +The pool must be declared with the list's `pool_type`. + +### Example +```cpp +// The element type +struct Point { int x; int y; }; + +// The list type +using List = etl::list_ext; + +// The shared pool +etl::pool pool; +``` + +## Template deduction guides +**C++17 and above** + +```cpp +template +etl::list(T...) +``` + +### Example +```cpp +etl::list data{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +``` +Defines data as an list of `int`, of length `10`, containing the supplied data. + +## Make template +**C++11 and above** +```cpp +template +constexpr auto make_list(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_list(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); +``` + +## Member types + +```cpp +value_type T +size_type std::size_t +difference_type std::ptrdiff_t +reference value_type& +const_reference const value_type& +rvalue_reference value_type&& +pointer value_type* +const_pointer const value_type* +iterator Bi-directional iterator +const_iterator Constant bi-directional iterator +reverse_iterator ETL_OR_STD::reverse_iterator +const_reverse_iterator ETL_OR_STD::reverse_iterator +``` + +## Constructors + +```cpp +etl::list() +``` + +--- + +```cpp +etl::list(size_t initialSize, parameter_t value = T()) +``` + +--- + +```cpp +etl::list(const etl::list&) +``` + +--- + +```cpp +etl::list(etl::list&&) +``` + +--- + +```cpp +template +etl::list(TIterator begin, TIterator end) +``` +**Description** +Emits an `etl::list_iterator` if the iterators are invalid. If asserts or exceptions are disabled then undefined behaviour occurs. + +## For shared pool lists + +```cpp +etl::list(etl::pool& pool) +``` + +```cpp +etl::list(size_t initialSize, parameter_t value, etl::pool& pool) +``` + +```cpp +template +etl::list(TIterator begin, TIterator end, etl::pool& pool) +``` +**Description** +Emits an `etl::list_iterator` if the iterators are invalid. If asserts or exceptions are disabled then undefined behaviour occurs. + +### Copy constructor +**Implicit pool** +Uses the pool from other. +```cpp +etl::list(etl::list& other) +``` + +**Explicit pool** +```cpp +etl::list(etl::list& other, etl::pool& pool) +``` + +### Initialisation + +if the list is sharing pools then a `set_pool(etl::pool&)` is available. +If a pool has already been set then the list is first cleared before updating to the new pool. + +The pool instance can be retrieved by call `get_pool()` + +## Element access + +```cpp +T& front() +const T& front() const +``` +**Description** +Returns a reference or const reference to the first element. +Undefined behaviour if the list is empty. + +--- + +```cpp +T& back() +const T& back() const +``` +**Description** +Returns a reference or const reference to the last element. +Undefined behaviour if the list is empty. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the list. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the list. + +--- + +```cpp +reverse_iterator rbegin() +const_reverse_iterator rbegin() const +const_reverse_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the list. + +--- + +```cpp +reverse_iterator rend() +const_reverse_iterator rend() const +const_reverse_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the list. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns true if the size of the list is zero, otherwise false. + +--- + +```cpp +bool full() const +``` +**Description** +Returns true if the size of the list is SIZE, otherwise false. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the list. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the list. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the list. + +## Modifiers + +```cpp +template +void assign(TIterator begin, TIterator end) +``` +**Description** +Assigns from a range of values. + +--- + +```cpp +void assign(size_t n, parameter_t value) +``` +**Description** +Fills the list with the values. + +--- + +```cpp +void push_front(const T& value) +void push_front(T&& value) +``` +**Description** +Pushes a value to the front of the list. +If the list is full then emits an `etl::list_full error`. + +--- + +```cpp +emplace_front +``` + +### C++03 + +```cpp +template +void emplace_front(const T1& value1) + +template +void emplace_front(const T1& value1, const T2& value2) + +template +void emplace_front(const T1& value1, const T2& value2, + const T3& value3) + +template +void emplace_front(const T1& value1, const T2& value2, + const T3& value3, const T4& value4) +``` +**Description** +Emplaces a value at the front, constructed using the supplied arguments. +Before: `20.35.10` + +```cpp +template +reference emplace_front(const T1& value1) + +template +reference emplace_front(const T1& value1, const T2& value2) + +template +reference emplace_front(const T1& value1, const T2& value2, + const T3& value3) + +template +reference emplace_front(const T1& value1, const T2& value2, + const T3& value3, const T4& value4) +``` +**Description** +Emplaces a value at the front, constructed using the supplied arguments. +Since: `20.35.10` + +### C++11 and above +```cpp +template +reference emplace_front(Args&& …args) +``` +**Description** +Emplaces a value at the front, constructed using the supplied arguments. + +--- + +```cpp +void push_back(const T& value); +void push_back(T&& value); +``` +**Description** +Pushes a value to the back of the list. +If the list is full and `ETL_CHECK_PUSH_POP` is defined then emits an `etl::list_full` error, otherwise undefined behaviour occurs. + +--- + +```cpp +emplace_back +``` +**Description** +Emplaces a value at the back, constructed using the supplied arguments. + +**C++03** +```cpp +template +void emplace_back(const T1& value1) + +template +void emplace_back(const T1& value1, const T2& value2) + +template +void emplace_back(const T1& value1, const T2& value2, + const T3& value3) + +template +void emplace_back(const T1& value1, const T2& value2, + const T3& value3, const T4& value4) +``` +Before: `20.35.10` + +```cpp +template +reference emplace_back(const T1& value1) + +template +reference emplace_back(const T1& value1, const T2& value2) + +template +reference emplace_back(const T1& value1, const T2& value2, + const T3& value3) + +template +reference emplace_back(const T1& value1, const T2& value2, + const T3& value3, const T4& value4) +``` +Since: `20.35.10` + +### C++11 and above +```cpp +template +reference emplace_back(Args&& ... args) +``` +**Description** +Emplaces a value at the back, constructed using the supplied arguments. +From: `20.35.10` + +--- + +**C++11 and above** +```cpp +template +reference emplace_back(Args&& ... args) +``` +**Description** +Emplaces a value at the back, constructed using the supplied arguments. +From: `20.35.10` + +--- + +```cpp +void pop_front() +``` +**Description** +Pop a value from the front of the list. +If the list is empty and `ETL_CHECK_PUSH_POP` is defined then emits an `etl::list_empty` error, otherwise undefined behaviour occurs. + +--- + +```cpp +void pop_back() +``` +**Description** +Pop a value from the back of the list. +If the list is empty and `ETL_CHECK_PUSH_POP` is defined then emits an `etl::list_empty` error, otherwise undefined behaviour occurs. + +--- + +```cpp +template +void insert(iterator position, TIterator begin, TIterator end) +``` +**Description** +Before: `20.20.0` + +--- + +```cpp +iterator insert(iterator position, parameter_t value); +void insert(iterator position, size_t n, parameter_t value) +``` + +```cpp +template +iterator insert(const_iterator position, TIterator begin, TIterator end) +``` +**Description** +Since `20.20.0` + +--- + +```cpp +iterator insert(const_iterator position, parameter_t value) +iterator insert(const_iterator position, size_t n, parameter_t value) +``` +**Description** +Inserts values in to the list. If the list is full then emits an `etl::list_full` error. + +--- + +```cpp +emplace +``` +**Description** +Constructs an item at the insert point in the list 'in place'. + +### C++03 +```cpp +void emplace(iterator position, const T1& value1) + +void emplace(iterator position, const T1& value1, const T2& value2) + +void emplace(iterator position, const T1& value1, const T2& value2, const T3& value3) + +void emplace(iterator position, const T1& value1, const T2& value2, const T3& value3, const T4& value4) +``` +Before: `20.20.0` +```cpp +iterator emplace(const_iterator position, const T1& value1) + +iterator emplace(const_iterator position, const T1& value1, const T2& value2) + +iterator emplace(const_iterator position, const T1& value1, const T2& value2, const T3& value3) + +iterator emplace(const_iterator position, const T1& value1, const T2& value2, const T3& value3, const T4& value4) +``` +**Description** +From: `20.20.0` + +### C++11 +```cpp +void emplace(iterator position, Args&& ... args) +``` +**Description** +Constructs an item at the insert point in the the list 'in place'. +Before: `20.20.0` + +```cpp +void emplace(const_iterator position, Args&& ... args) +``` +**Description** +Constructs an item at the insert point in the the list 'in place'. +From: `20.20.0` + +--- + +```cpp +template +iterator erase(TIterator begin, TIterator end) +``` + +--- + +```cpp +iterator erase(iterator position) +``` +**Description** +Before: `20.20.0` + +--- + +```cpp +iterator erase(iterator position) +iterator erase(const_iterator position) +``` +**Description** +Erases values in the list. +Before: `20.21.0` + +--- + +```cpp +void resize(size_t n); +void resize(size_t n, parameter_t value) +``` +**Description** +Resizes the list. If the new size is larger then the first assigns default constructed values, the second assigns the supplied value. +If `n` is larger than the capacity then emits an `etl::list_full` error, if asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +void clear(); +``` +**Description** +Clears the list to a size of zero. + +--- + +```cpp +void splice(iterator to, etl::ilist& other) +void splice(iterator to, etl::ilist&& other) +``` +**Description** +Moves the elements in list other to before the position to. +The operation performs copies between the different lists. + +--- + +```cpp +void splice(iterator to, etl::ilist& other, iterator from) +void splice(iterator to, etl::ilist&& other, iterator from) +``` +**Description** +Moves the element at position from in list other to before the position to. +The operation is fast when spicing within the same list, otherwise performs copies between different lists. +If from is not valid then undefined behaviour occurs. + +--- + +```cpp +void splice(iterator to, etl::ilist& other, iterator first, iterator last) +void splice(iterator to, etl::ilist&& other, iterator first, iterator last) +``` +**Description** +Moves the elements in the range first to one before last in list other to before the position to. +The operation is fast when spicing within the same list, otherwise performs copies between different lists. + +--- + +```cpp +void merge(etl::ilist& other) +void merge(etl::ilist&& other) +``` +**Description** +Merges the elements in list other to this list. +The lists must be sorted. If a debug compile and asserts or exceptions are enabled than an etl::list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs. + +--- + +```cpp +template +void merge(etl::ilist& other, TCompare compare) +``` + +--- + +```cpp +template +void merge(etl::ilist&& other, TCompare compare) +``` +**Description** +Merges the elements in list other to this list using the supplied comparison function to determine order. +The lists must already be sorted according to the compare function. +If a debug compile and asserts or exceptions are enabled than an etl::list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs. + +## Operations + +```cpp +void remove(const T& value) +``` +**Description** +Removes from the container all the elements that compare equal to value. + +--- + +```cpp +template +void remove_if(TPredicate predicate) +``` +**Description** +Removes from the container all the elements that satisfy predicate. + +--- + +```cpp +void unique() +``` +**Description** +Removes all but the first element from every group of consecutive elements. + +--- + +```cpp +template +void unique(TPredicate predicate) +``` +**Description** +Removes all but the first element from every group of consecutive elements that satisfy the binary predicate. + +--- + +```cpp +void sort() +``` +**Description** +Sorts using the `<` operator. + +```cpp +template +void sort(TCompare compare) +``` +**Description** +Sorts using the supplied compare function. + +--- + +```cpp +void reverse() +``` +**Description** +Reverses the order of the list. + +## Non-member functions + +```cpp +operator == +``` +**Description** +`true` if the contents of the lists are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the lists are not equal, otherwise `false`. + +--- + +```cpp +operator < +``` +**Description** +`true` if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator <= +``` +**Description** +`true` if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator > +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator >= +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`. + + +## Shared pool example + +```cpp +// The element type. +struct Point { int x; int y; }; + +// The list type +using List = etl::list_ext; + +// The shared pool. Maximum of 10 items. +etl::pool pool; + +// The vector of lists with shared pools. +etl::vector vector_of_lists(3, List(pool)); + +// Make some data. +Point point = { 1, 2 }; + +// Push one to each list. +vector_of_lists[0].push_back(point); +vector_of_lists[1].push_back(point); +vector_of_lists[2].push_back(point); + +size_t available = 0; + +available = vector_of_lists[0].available(); // Reports '7' +available = vector_of_lists[1].available(); // Reports '7' +available = vector_of_lists[2].available(); // Reports '7' +``` diff --git a/docs/containers/maps/_index.md b/docs/containers/maps/_index.md new file mode 100644 index 00000000..9f9818f3 --- /dev/null +++ b/docs/containers/maps/_index.md @@ -0,0 +1,6 @@ +--- +title: "Maps" +weight: 100 +--- + +Map like containers. \ No newline at end of file diff --git a/docs/containers/maps/const-map.md b/docs/containers/maps/const-map.md new file mode 100644 index 00000000..2679776b --- /dev/null +++ b/docs/containers/maps/const-map.md @@ -0,0 +1,211 @@ +--- +title: "const_map / const_map_ext" +--- + +{{< callout >}} + Header: `const_map.h` + Since: TBC + Similar to: [std::map](https://en.cppreference.com/w/cpp/container/map.html) +{{< /callout >}} + +A fixed capacity read-only map based on a sorted array. +The containers are designed to be able to be constexpr for C++14 and up. + +The interface is most similar to `std::map`. +Uses etl::less as the default key comparison method. +```cpp +etl::const_map +etl::const_map_ext +``` + +Inherits from `etl::iconst_map` +`etl::iconst_map` may be used as a Size independent pointer or reference type for any `etl::const_map` instance. +Both the key type and mapped type must be default constructible. + +## Template deduction guides +**C++17 and above** + +```cpp +template +etl::const_map(TPairs...) +``` + +**Example** +```cpp +constexpr etl::const_map data{ etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7} }; +``` +Defines data as an `const_map` of `int`/`int` pairs, of length 4, containing the supplied data. + +--- + +```cpp +template +etl::const_map_ext(TPairs...) +``` + +**Example** +```cpp +constexpr etl::pair values[]{ etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7} }; + +constexpr etl::const_map_ext data{ values }; +``` +Defines data as an `const_map` of `int`/`int` pairs, of length 4, containing the supplied data. + +```cpp +constexpr values[]{ etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7} }; +constexpr etl::span, 4> span{ values }; +constexpr etl::const_map_ext data{ span }; +``` +Defines data as an `const_map` of `int`/`int` pairs, of length 4, containing the supplied data. + +## Member types + +| Type | Maps to | Description | +| ----------------- | --------------------------------- | ---------------------------------------------------------------- | +| `key_type` | TKey | Must be default constructible. | +| `mapped_type` | TMapped | Must be default constructible. | +| `value_type` | pair | The type is either std::pair (default) or etl::pair (ETL_NO_STL) | +| `size_type` | std::size_t | | +| `difference_type` | std::ptrdiff_t | | +| `const_reference` | const T& | | +| `const_pointer` | const T* | | +|` const_iterator` | | Constant random access iterator | + +## Constructor +```cpp +template +ETL_CONSTEXPR14 explicit const_map(TElements&&... elements) ETL_NOEXCEPT +``` +Construct a const_map from a variadic list of elements. +Static asserts if the elements are not of type `value_type`. +Static asserts if the number of elements is greater than the capacity of the `const_map`. + +## Element access +```cpp +ETL_CONSTEXPR14 const TMapped& at(key_parameter_t key) const ETL_NOEXCEPT +``` +**Description** +Returns a const reference to the indexed element. + +```cpp +ETL_CONSTEXPR14 const TMapped& operator[](key_parameter_t key) const ETL_NOEXCEPT +``` +**Description** +Returns a const reference to the indexed element. + +## Iterators +```cpp +const_iterator begin() const ETL_NOEXCEPT +const_iterator cbegin() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the beginning of the map. + +```cpp +const_iterator end() const ETL_NOEXCEPT +const_iterator cend() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the end of the map. + +## Capacity +```cpp +ETL_CONSTEXPR14 bool empty() const ETL_NOEXCEPT +``` +**Description** +Returns `true` if the size of the map is zero, otherwise `false`. + +```cpp +ETL_CONSTEXPR14 bool full() const ETL_NOEXCEPT +``` +**Description** +Returns `true` if the size of the lookup is size, otherwise `false`. + +```cpp +ETL_CONSTEXPR14 size_t size() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the lookup. + +```cpp +ETL_CONSTEXPR14 size_t max_size() const ETL_NOEXCEPT +``` +**Description** +Returns the maximum possible Size of the map. + +## Status +```cpp +ETL_CONSTEXPR14 bool is_valid() const ETL_NOEXCEPT +``` +**Description** +Check that the elements are valid for a map. +The elements must be sorted and contain no duplicates. + +## Search +```cpp +ETL_CONSTEXPR14 const_iterator find(const key_type& key) const ETL_NOEXCEPT +``` +```cpp +ETL_CONSTEXPR14 const_iterator lower_bound(const key_type& key) const ETL_NOEXCEPT +``` +```cpp +ETL_CONSTEXPR14 const_iterator upper_bound(const key_type& key) const ETL_NOEXCEPT +``` +```cpp +ETL_CONSTEXPR14 pair equal_range(const key_type& key) const ETL_NOEXCEPT +``` +**Description** +The return type is either std::pair (default) or etl::pair (ETL_NO_STL) + +```cpp +ETL_CONSTEXPR14 bool contains(const key_type& k) const ETL_NOEXCEPT +``` +**Description** +Check if the container contains the key. + +--- + +**For comparators that define is_transparent.** + +```cpp +template +ETL_CONSTEXPR14 const_iterator find(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 const_iterator lower_bound(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 const_iterator upper_bound(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 pair equal_range(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 bool contains(const K& k) const ETL_NOEXCEPT +``` +**Description** +Check if the container contains the key. + +## Non-member functions + +**Lexicographically comparisons** +| Operator | Description | +| -------- | ----------------------------------------------------------------------------------- | +| `==` | `true` if the contents of the maps are equal, otherwise `false`. | +| `!=` | `true` if the contents of the maps are not equal, otherwise `false`. | +| `<` | `true` if the contents of the lhs is less-than the rhs, otherwise `false`. | +| `<=` | `true` if the contents of the lhs is less-than-equal the rhs, otherwise `false`. | +| `>` | `true` if the contents of the lhs is greater-than the rhs, otherwise `false`. | +| `>=` | `true` if the contents of the lhs is greater-than-equal the rhs, otherwise `false`. | + +## Technical stuff + +The const map is implemented as a sorted array key/value pairs. + diff --git a/docs/containers/maps/const-multimap.md b/docs/containers/maps/const-multimap.md new file mode 100644 index 00000000..19867bd4 --- /dev/null +++ b/docs/containers/maps/const-multimap.md @@ -0,0 +1,235 @@ +--- +title: "const_multimap / const_multimap_ext" +--- + +{{< callout >}} + Header: `const_multimap.h` + Since: TBC + Similar to: [std::multimap](https://en.cppreference.com/w/cpp/container/multimap.html) +{{< /callout >}} + +A fixed capacity read-only multimap based on a sorted array. +The containers are designed to be able to be constexpr for C++14 and up. + +The interface is most similar to `std::multimap`. +Uses `etl::less` as the default key comparison method. + +```cpp +etl::const_multimap +etl::const_multimap_ext +``` + +Inherits from `etl::iconst_multimap`. +`etl::iconst_multimap` may be used as a size independent pointer or reference type for any `etl::const_map` instance. +Both the key type and mapped type must be default constructible. + +## Template deduction guides +**C++17 and above** +```cpp +template +etl::const_multimap(TPairs...) +``` + +**Example** +```cpp +constexpr etl::const_multimap data{ etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7} }; +``` +Defines data as an const_multimap of `int`/`int` pairs, of length 4, containing the supplied data. + +```cpp +template +etl::const_multimap_ext(TPairs...) +``` + +**Example** +```cpp +constexpr etl::pair values[]{ etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7} }; +constexpr etl::const_multimap_ext data{ values }; +``` +Defines data as an const_multimap of `int`/`int` pairs, of length 4, containing the supplied data. +```cpp +constexpr values[]{ etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7} }; +constexpr etl::span, 4> span{ values }; +constexpr etl::const_multimap_ext data{ span }; +``` +Defines data as an const_multimap of `int`/`int` pairs, of length 4, containing the supplied data. + +## Member types + +| Type | Maps to | Description | +| ----------------- | --------------------------------- | ---------------------------------------------------------------- | +| `key_type` | TKey | Must be default constructible. | +| `mapped_type` | TMapped | Must be default constructible. | +| `value_type` | pair | The type is either std::pair (default) or etl::pair (ETL_NO_STL) | +| `size_type` | std::size_t | | +| `difference_type` | std::ptrdiff_t | | +| `const_reference` | const T& | | +| `const_pointer` | const T* | | +|` const_iterator` | | Constant random access iterator | + +## Constructor + +```cpp +template +ETL_CONSTEXPR14 explicit const_multimap(TElements&&... elements) ETL_NOEXCEPT +``` +**Description** +Constructs a const_multimap from a variadic list of elements. +Static asserts if the elements are not of type `value_type`. +Static asserts if the number of elements is greater than the capacity of the `const_multimap`. + +## Iterators + +```cpp +const_iterator begin() const ETL_NOEXCEPT +const_iterator cbegin() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the beginning of the multimap. + +```cpp +const_iterator end() const ETL_NOEXCEPT +const_iterator cend() const ETL_NOEXCEPT +``` +**Description** +Returns an iterator to the end of the multimap. + +## Capacity + +```cpp +ETL_CONSTEXPR14 bool empty() const ETL_NOEXCEPT +``` +**Description** +Returns true if the size of the multimap is zero, otherwise false. + +```cpp +ETL_CONSTEXPR14 bool full() const ETL_NOEXCEPT +``` +**Description** +Returns true if the size of the lookup is size, otherwise false. + +```cpp +ETL_CONSTEXPR14 size_t size() const ETL_NOEXCEPT +``` +**Description** +Returns the size of the lookup. + +```cpp +ETL_CONSTEXPR14 size_t max_size() const ETL_NOEXCEPT +``` +**Description** +Returns the maximum possible Size of the multimap. + +## Status +```cpp +ETL_CONSTEXPR14 bool is_valid() const ETL_NOEXCEPT +``` +**Description** +Check that the elements are valid for a multimap. +The elements must be sorted. + +## Search + +```cpp +ETL_CONSTEXPR14 const_iterator find(const key_type& key) const ETL_NOEXCEPT +``` +```cpp +ETL_CONSTEXPR14 const_iterator lower_bound(const key_type& key) const ETL_NOEXCEPT +``` +```cpp +ETL_CONSTEXPR14 const_iterator upper_bound(const key_type& key) const ETL_NOEXCEPT +``` +```cpp +ETL_CONSTEXPR14 pair equal_range(const key_type& key) const ETL_NOEXCEPT +``` +**Description** +The return type is either `std::pair` (default) or `etl::pair` (ETL_NO_STL) + +```cpp +ETL_CONSTEXPR14 bool contains(const key_type& k) const ETL_NOEXCEPT +``` +**Description** +Checks if the container contains the key. + +--- + +**For comparators that define is_transparent.** + +```cpp +template +ETL_CONSTEXPR14 const_iterator find(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 const_iterator lower_bound(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 const_iterator upper_bound(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 pair equal_range(const K& key) const ETL_NOEXCEPT +``` +```cpp +template +ETL_CONSTEXPR14 bool contains(const K& k) const ETL_NOEXCEPT +``` +**Description** +Checks if the container contains the key. + +## Non-member functions + +**Lexicographically comparisons** +```cpp +operator == +``` +**Description** +`true` if the contents of the lists are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the lists are not equal, otherwise `false`. + +--- + +```cpp +operator < +``` +**Description** +`true` if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator <= +``` +**Description** +`true` if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator > +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise `false`. + +--- + +```cpp +operator >= +``` +**Description** +`true` if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise `false`. + +## Technical stuff + +The const multimap is implemented as a sorted array key/value pairs. diff --git a/docs/containers/maps/flat-map.md b/docs/containers/maps/flat-map.md new file mode 100644 index 00000000..dd1d1850 --- /dev/null +++ b/docs/containers/maps/flat-map.md @@ -0,0 +1,500 @@ +--- +title: "flat_map" +--- + +{{< callout type="info">}} + Header: `flat_map.h` + Similar to: `std::map` +{{< /callout >}} + +A fixed capacity map based on a sorted vector. +The container is an associative lookup table with O(N) insertion and erase, and O(log N) search. +This container is best used for tables that are occasionally updated and spend most of their time being searched. +Uses `etl::less` as the default key comparison method. + +```cpp +etl::flat_map +``` + +Inherits from `etl::iflat_map`. +`etl::iflat_map` may be used as a size independent pointer or reference type for any `etl::flat_map` instance. + +## Template deduction guides +C++17 and above + +```cpp +template +etl::flat_map(TPairs...) +``` + +### Example +```cpp +etl::flat_map data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl::pair{6, 7} }; +``` +Defines data as an `flat_map` of `int`/`int` pairs, of length 4, containing the supplied data. + +## make_flat_map +C++11 and above +```cpp +template , + typename... TPairs> +constexpr auto make_flat_map(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_flat_map(etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7}); +``` + +## Member types + +```cpp +key_type TKey +mapped_type TMapped +value_type pair + The type is either std::pair (default) or etl::pair (ETL_NO_STL) +size_type std::size_t +difference_type std::ptrdiff_t +reference T& +const_reference const T& +rvalue_reference T&& +pointer T* +const_pointer const T* +iterator Random access iterator +const_iterator Constant random access iterator +reverse_iterator reverse_iterator +const_reverse_iterator reverse_iterator +``` + +## Static Constants + +`MAX_SIZE` The maximum size of the flat map. + +## Constructors + +```cpp +etl::flat_map() +``` +**Description** +Default constructor. + +--- + +```cpp +etl::flat_map(const flat_map& other) +``` +**Description** +Copy constructor. + +--- + +```cpp +etl::flat_map(flat_map&& other) +``` +**Description** +Move constructor. + +--- + +```cpp +template +etl::flat_map(TIterator begin, TIterator end); +``` +**Description** +Construct from the range [`begin`, `end`). + +## Element access + +```cpp +TMapped& at(const_key_reference key) +const TMapped& at(const_key_reference key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Emits an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +TMapped& operator[](const_key_reference key) +const TMapped& operator[](const_key_reference key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +If the key is not in the table then a new entry is created. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the map. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the map. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the map. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the map. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the map is zero, otherwise `false`. + +--- + +```cpp +bool full() const +``` +**Description** +Returns `true` if the size of the lookup is `SIZE`, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the lookup. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the map. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the map. + +## Modifiers + +```cpp +flat_map& operator = (const flat_map& rhs) +flat_map& operator = (flat_map&& rhs) +``` +**Description** +Copies or moves the data from another flat map. + +--- + +```cpp +pair insert(const value_type& value) +pair insert(value_type&& value) +iterator insert(iterator position, const value_type& value) +iterator insert(iterator position, value_type&& value) +``` +**Description** +Inserts a value into the map. + +```cpp +template +void insert(TIterator first, TIterator last) +``` +**Description** +Inserts values in to the map. +If the map is full then emits an `etl::flat_map_full`. If asserts or exceptions are not enabled then undefined behaviour occurs. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +```cpp +pair emplace((const value_type& value)) +pair emplace(const key_type& key, const mapped_type& value) +``` +**Description** +Inserts key/value pairs into the map by constructing directly into storage. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +**C++03** +The emplace functions differ from that of std::map in that, due to C++03 not supporting 'perfect forwarding', the values for constructing mapped types must be listed as parameters and not nested in a 'mapped' value parameter. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +```cpp +template +pair emplace(const key_type& key, const T1& value1) +``` +**Description** +Emplaces a value constructed from `key` and 1 argument into the map. + +```cpp +template +pair emplace(const key_type& key, const T1& value1, const T2& value2) +``` +**Description** +Emplaces a value constructed from `key` and 2 arguments into the map. + +```cpp +template +pair emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3) +``` +**Description** +Emplaces a value constructed from `key` and 3 arguments into the map. + +```cpp +template +pair emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3, const T4& value4) +``` +**Description** +Emplaces a value constructed from `key` and 4 arguments into the map. + +--- + +**C++11** +```cpp +template +pair emplace(const key_type& key, Args&& ... args) +``` +**Description** +Emplaces a value constructed from the `key` and arguments into the map. + +--- + +```cpp +size_t erase(key_value_parameter_t key) +void erase(iterator i_element) +void erase(iterator first, iterator last) +``` +**Description** +Erase elements from the map. + +--- + +```cpp +iterator erase(const_iterator i_element) +iterator erase(const_iteratorfirst, const_iteratorlast) +``` +**Description** +Erase elements from the map. +From: `20.20.0` + +--- + +```cpp +template +size_t erase(K&& key) +``` +**Description** +Erases values in the map. +Returns an iterator to the next element in the map. +Iterator parameters are not checked for validity. +From: `20.21.0` + +--- + +```cpp +void clear(); +``` +**Description** +Clears the map to a size of zero. + +## Search + +```cpp +iterator find(key_value_parameter_t key) +const_iterator find(key_value_parameter_t key) const +``` +**Description** +Searches for an element with the key `key`. +Returns an iterator to the element, or `end()` if not found. + +```cpp +iterator lower_bound(key_value_parameter_t key) +const_iterator lower_bound(key_value_parameter_t key) const +``` +**Description** +Searches for an element with the key not less than `key`. +Returns an iterator to the element, or `end()` if not found. + +```cpp +iterator upper_bound(key_value_parameter_t key) +const_iterator upper_bound(key_value_parameter_t key) const +``` +**Description** +Searches for an element with the key greater than `key`. +Returns an iterator to the element, or `end()` if not found. + +```cpp +pair equal_range(key_value_parameter_t key) +pair equal_range(key_value_parameter_t key) const +``` +**Description** +Returns the range of elements with a key equal to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +**For comparators that define is_transparent.** + +```cpp +template +iterator find(const K& key) +``` +**Description** +Searches for an element with the key `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +```cpp +template +const_iterator find(const K& key) const +``` +**Description** +Searches for an element with the key `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +--- + +```cpp +template +iterator lower_bound(const K& key) +``` +**Description** +Searches for an element with the key not less than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +```cpp +template +const_iterator lower_bound(const K& key) const +``` +**Description** +Searches for an element with the key not less than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +--- + +```cpp +template +iterator upper_bound(const K& key) +``` +**Description** +Searches for an element with the key greater than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +```cpp +template +const_iterator upper_bound(const K& key) const +``` +**Description** +Searches for an element with the key greater than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +--- + +```cpp +template +pair equal_range(const K& key) +``` +**Description** +Returns the range of elements with a key equal to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) +From: `20.21.0` +Since: C++11 + +```cpp +template +pair equal_range(const K& key) const +``` +**Description** +Returns the range of elements with a key equal to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) +From: `20.21.0` +Since: C++11 + +--- + +```cpp +bool contains(key_value_parameter_t key) const +``` +Check if the container contains the key. +From: `20.21.0` + + +--- + +```cpp +template +bool contains(const K& k) const +``` +Check if the container contains the key. +For comparators that define `is_transparent`. +From: `20.21.0` +Since: C++11 + +## Non-member functions + +**Lexicographically comparisons** + +```cpp +operator == +``` +`true` if the contents of the maps are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +`true` if the contents of the maps are not equal, otherwise `false`. + +## Technical stuff + +Flat maps are usually implemented internally as a sorted vector of key/value pairs. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial keys or values. +As inserting requires that all of the items to the right of the insert position must be shifted this can become an expensive operation for larger containers. + +To improve insertion performance ETL flat maps are implemented as vectors of pointers to key/value pairs, sorted by key value. An insertion will involve a copy of a range of pointers; an operation that can be very fast. + +The downside is that access to an item via an iterator will involve one indirection and the overhead of the container will be one pointer per item. A normal flat map implementation does not have this overhead. diff --git a/docs/containers/maps/flat-multimap.md b/docs/containers/maps/flat-multimap.md new file mode 100644 index 00000000..b6f6832d --- /dev/null +++ b/docs/containers/maps/flat-multimap.md @@ -0,0 +1,500 @@ +--- +title: "flat_multimap" +--- + +{{< callout type="info">}} + Header: `flat_multimap.h` + Similar to: `std::multimap` +{{< /callout >}} + +A fixed capacity multimap based on a sorted vector. +The container is an associative lookup table with O(N) insertion and erase, and O(log N) search. +This container is best used for tables that are occasionally updated and spend most of their time being searched. +Uses `etl::less` as the default key comparison method. + +```cpp +etl::flat_multimap +``` + +Inherits from `etl::iflat_map`. +`etl::iflat_map` may be used as a size independent pointer or reference type for any `etl::flat_multimap` instance. + +## Template deduction guides +C++17 and above + +```cpp +template +etl::flat_multimap(TPairs...) +``` + +### Example +```cpp +etl::flat_multimap data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl::pair{6, 7} }; +``` +Defines data as an `flat_multimap` of `int`/`int` pairs, of length 4, containing the supplied data. + +## make_flat_map +C++11 and above +```cpp +template , + typename... TPairs> +constexpr auto make_flat_map(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_flat_map(etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7}); +``` + +## Member types + +```cpp +key_type TKey +mapped_type TMapped +value_type pair + The type is either std::pair (default) or etl::pair (ETL_NO_STL) +size_type std::size_t +difference_type std::ptrdiff_t +reference T& +const_reference const T& +rvalue_reference T&& +pointer T* +const_pointer const T* +iterator Random access iterator +const_iterator Constant random access iterator +reverse_iterator reverse_iterator +const_reverse_iterator reverse_iterator +``` + +## Static Constants + +`MAX_SIZE` The maximum size of the flat map. + +## Constructors + +```cpp +etl::flat_multimap() +``` +**Description** +Default constructor. + +--- + +```cpp +etl::flat_multimap(const flat_multimap& other) +``` +**Description** +Copy constructor. + +--- + +```cpp +etl::flat_multimap(flat_multimap&& other) +``` +**Description** +Move constructor. + +--- + +```cpp +template +etl::flat_multimap(TIterator begin, TIterator end); +``` +**Description** +Construct from the range [`begin`, `end`). + +## Element access + +```cpp +TMapped& at(const_key_reference key) +const TMapped& at(const_key_reference key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Emits an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +TMapped& operator[](const_key_reference key) +const TMapped& operator[](const_key_reference key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +If the key is not in the table then a new entry is created. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the map. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the map. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the map. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the map. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the map is zero, otherwise `false`. + +--- + +```cpp +bool full() const +``` +**Description** +Returns `true` if the size of the lookup is `SIZE`, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the lookup. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the map. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the map. + +## Modifiers + +```cpp +flat_multimap& operator = (const flat_multimap& rhs) +flat_multimap& operator = (flat_multimap&& rhs) +``` +**Description** +Copies or moves the data from another flat map. + +--- + +```cpp +pair insert(const value_type& value) +pair insert(value_type&& value) +iterator insert(iterator position, const value_type& value) +iterator insert(iterator position, value_type&& value) +``` +**Description** +Inserts a value into the map. + +```cpp +template +void insert(TIterator first, TIterator last) +``` +**Description** +Inserts values in to the map. +If the map is full then emits an `etl::flat_map_full`. If asserts or exceptions are not enabled then undefined behaviour occurs. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +```cpp +pair emplace((const value_type& value)) +pair emplace(const key_type& key, const mapped_type& value) +``` +**Description** +Inserts key/value pairs into the map by constructing directly into storage. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +**C++03** +The emplace functions differ from that of std::map in that, due to C++03 not supporting 'perfect forwarding', the values for constructing mapped types must be listed as parameters and not nested in a 'mapped' value parameter. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +```cpp +template +pair emplace(const key_type& key, const T1& value1) +``` +**Description** +Emplaces a value constructed from `key` and 1 argument into the map. + +```cpp +template +pair emplace(const key_type& key, const T1& value1, const T2& value2) +``` +**Description** +Emplaces a value constructed from `key` and 2 arguments into the map. + +```cpp +template +pair emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3) +``` +**Description** +Emplaces a value constructed from `key` and 3 arguments into the map. + +```cpp +template +pair emplace(const key_type& key, const T1& value1, const T2& value2, const T3& value3, const T4& value4) +``` +**Description** +Emplaces a value constructed from `key` and 4 arguments into the map. + +--- + +**C++11** +```cpp +template +pair emplace(const key_type& key, Args&& ... args) +``` +**Description** +Emplaces a value constructed from the `key` and arguments into the map. + +--- + +```cpp +size_t erase(key_value_parameter_t key) +void erase(iterator i_element) +void erase(iterator first, iterator last) +``` +**Description** +Erase elements from the map. + +--- + +```cpp +iterator erase(const_iterator i_element) +iterator erase(const_iteratorfirst, const_iteratorlast) +``` +**Description** +Erase elements from the map. +From: `20.20.0` + +--- + +```cpp +template +size_t erase(K&& key) +``` +**Description** +Erases values in the map. +Returns an iterator to the next element in the map. +Iterator parameters are not checked for validity. +From: `20.21.0` + +--- + +```cpp +void clear(); +``` +**Description** +Clears the map to a size of zero. + +## Search + +```cpp +iterator find(key_value_parameter_t key) +const_iterator find(key_value_parameter_t key) const +``` +**Description** +Searches for an element with the key `key`. +Returns an iterator to the element, or `end()` if not found. + +```cpp +iterator lower_bound(key_value_parameter_t key) +const_iterator lower_bound(key_value_parameter_t key) const +``` +**Description** +Searches for an element with the key not less than `key`. +Returns an iterator to the element, or `end()` if not found. + +```cpp +iterator upper_bound(key_value_parameter_t key) +const_iterator upper_bound(key_value_parameter_t key) const +``` +**Description** +Searches for an element with the key greater than `key`. +Returns an iterator to the element, or `end()` if not found. + +```cpp +pair equal_range(key_value_parameter_t key) +pair equal_range(key_value_parameter_t key) const +``` +**Description** +Returns the range of elements with a key equal to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +**For comparators that define is_transparent.** + +```cpp +template +iterator find(const K& key) +``` +**Description** +Searches for an element with the key `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +```cpp +template +const_iterator find(const K& key) const +``` +**Description** +Searches for an element with the key `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +--- + +```cpp +template +iterator lower_bound(const K& key) +``` +**Description** +Searches for an element with the key not less than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +```cpp +template +const_iterator lower_bound(const K& key) const +``` +**Description** +Searches for an element with the key not less than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +--- + +```cpp +template +iterator upper_bound(const K& key) +``` +**Description** +Searches for an element with the key greater than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +```cpp +template +const_iterator upper_bound(const K& key) const +``` +**Description** +Searches for an element with the key greater than `key`. +Returns an iterator to the element, or `end()` if not found. +From: `20.21.0` +Since: C++11 + +--- + +```cpp +template +pair equal_range(const K& key) +``` +**Description** +Returns the range of elements with a key equal to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) +From: `20.21.0` +Since: C++11 + +```cpp +template +pair equal_range(const K& key) const +``` +**Description** +Returns the range of elements with a key equal to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) +From: `20.21.0` +Since: C++11 + +--- + +```cpp +bool contains(key_value_parameter_t key) const +``` +Check if the container contains the key. +From: `20.21.0` + + +--- + +```cpp +template +bool contains(const K& k) const +``` +Check if the container contains the key. +For comparators that define `is_transparent`. +From: `20.21.0` +Since: C++11 + +## Non-member functions + +**Lexicographically comparisons** + +```cpp +operator == +``` +`true` if the contents of the maps are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +`true` if the contents of the maps are not equal, otherwise `false`. + +## Technical stuff + +Flat maps are usually implemented internally as a sorted vector of key/value pairs. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial keys or values. +As inserting requires that all of the items to the right of the insert position must be shifted this can become an expensive operation for larger containers. + +To improve insertion performance ETL flat maps are implemented as vectors of pointers to key/value pairs, sorted by key value. An insertion will involve a copy of a range of pointers; an operation that can be very fast. + +The downside is that access to an item via an iterator will involve one indirection and the overhead of the container will be one pointer per item. A normal flat map implementation does not have this overhead. diff --git a/docs/containers/maps/map.md b/docs/containers/maps/map.md new file mode 100644 index 00000000..d212ce5e --- /dev/null +++ b/docs/containers/maps/map.md @@ -0,0 +1,425 @@ +--- +title: "map" +--- + +{{< callout type="info">}} + Header: `map.h` + Similar to: `std::map` +{{< /callout >}} + +A fixed capacity map. +Uses `std::less` as the default key comparison method. + +```cpp +etl::map +``` + +Inherits from `etl::imap`. +`etl::imap` may be used as a size independent pointer or reference type for any etl::map instance. + +## Template deduction guides +C++17 and above + +```cpp +template +etl::map(TPairs...) +``` + +### Example +```cpp +etl::map data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl::pair{6, 7} } +``` +Defines data as an map of `int`/`int` pairs, of length 4, containing the supplied data. + +## Make template +**C++11 and above** +```cpp +template , + typename... TPairs> +constexpr auto make_flat_map(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_map(etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7}); +``` + +## Member types + +```cpp +key_type TKey +mapped_type TMapped +value_type etl or std::pair +size_type size_t +difference_type ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator Random access iterator +const_iterator Constant random access iterator +reverse_iterator etl or std::reverse_iterator +const_reverse_iterator etl or std::reverse_iterator +``` + +## Constructor + +```cpp +etl::map(); +``` +**Description** +Default constructor. + + +```cpp +template +etl::map(TIterator begin, TIterator end); +``` +**Description** +Construct from the range [`begin`, `end`). + +## Element access + +```cpp +TMapped& at(key_parameter_t key) +const TMapped& at(key_parameter_t key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Asserts an `etl::map_out_of_range` if the key is not in the table. +If assert or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +TMapped& operator[](key_parameter_t key) +const TMapped& operator[](key_parameter_t key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +If the key does not exist then one is created using the default constructor. +If the map is full then asserts an `etl::map_full`. If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +iterator find(key_parameter_t key); +const_iterator find(key_parameter_t key) const +``` +**Description** +Searches the container for an element with a key equivalent to key and returns an iterator to it if found, otherwise it returns an iterator to `etl::map::end()`. + +--- + +```cpp +size_type count(key_parameter_t key) const +``` +**Description** +Count elements with a specific key. +Searches the container for elements with a key equivalent to key and returns the number of matches + +--- + +```cpp +iterator lower_bound(key_parameter_t key); +const_iterator lower_bound(key_parameter_t key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose `key` is not considered to go before key (i.e., either it is equivalent or goes after). + +--- + +```cpp +iterator upper_bound(key_parameter_t key); +const_iterator upper_bound(key_parameter_t key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. + +--- + +```cpp +pair equal_range(key_parameter_t key) const +pair equal_range(key_parameter_t key) +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +**For comparators that define `is_transparent`.** + +```cpp +template +iterator find(const K& key) +``` +**Description** +Searches the container for an element with a key equivalent to key and returns an iterator to it if found, otherwise it returns an iterator to `etl::map::end()`. +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +const_iterator find(const K& key) const +``` +**Description** +Searches the container for an element with a key equivalent to `key` and returns a const iterator to it if found, otherwise it returns a const iterator to `etl::map::end()`. + +--- + +```cpp +template +iterator lower_bound(const K& key) +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is not considered to go before `key` (i.e., either it is equivalent or goes after). +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +const_iterator lower_bound(const K& key) const +``` +**Description** +Returns a const iterator pointing to the first element in the container whose key is not considered to go before `key` (i.e., either it is equivalent or goes after). +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +iterator upper_bound(const K& key) +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +const_iterator upper_bound(const K& key) const +``` +**Description** +Returns a const iterator pointing to the first element in the container whose key is considered to go after `key`. +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +pair equal_range(const K& key) +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +pair equal_range(const K& key) const +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +```cpp +bool contains(key_value_parameter_t key) const +``` +**Description** +Check if the container contains the key. +Since: `20.21.0` + +--- + +```cpp +template +bool contains(const K& k) const +``` +**Description** +Check if the container contains the key. +Since: `20.21.0` +C++11 or above. +For comparators that define is_transparent. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the map. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the map. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the map. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the map. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns true if the size of the map is zero, otherwise false. + +--- + +```cpp +bool full() const +``` +**Description** +Returns true if the size of the map is SIZE, otherwise false. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the map. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the map. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the map. + +--- + +## Modifiers + +```cpp +template +void insert(TIterator begin, TIterator end) +``` +**Description** +Before: `20.20.0` +--- + + +```cpp +template +iterator insert(TIterator begin, TIterator end) +``` +**Description** +Since: `20.20.0` + +--- + +```cpp +iterator insert(mapped_parameter_t value) +``` +**Description** +Inserts values in to the map. +If the map is full then asserts an etl::map_full error. If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +template +iterator erase(TIterator begin, TIterator end) +``` +**Description** + +--- + +```cpp +iterator erase(TIterator element) +``` +**Description** +Erases values in the map. +Iterator are not checked for validity. + +--- + +```cpp +size_t erase(const key_type& key) +``` +**Description** + +--- + +20.21.0 +```cpp +template +size_t erase(K&& key) +``` +**Description** + +--- + +```cpp +void clear() +``` +**Description** +Clears the map to a size of zero. + +## Non-member functions + +```cpp +operator == +``` +**Description** +`true` if the contents of the maps are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the maps are not equal, otherwise `false`. diff --git a/docs/containers/maps/multimap.md b/docs/containers/maps/multimap.md new file mode 100644 index 00000000..09fda167 --- /dev/null +++ b/docs/containers/maps/multimap.md @@ -0,0 +1,425 @@ +--- +title: "multimap" +--- + +{{< callout type="info">}} + Header: `multimap.h` + Similar to: `std::multimap` +{{< /callout >}} + +A fixed capacity multimap. +Uses `std::less` as the default key comparison method. + +```cpp +etl::multimap +``` + +Inherits from `etl::imap`. +`etl::imap` may be used as a size independent pointer or reference type for any etl::multimap instance. + +## Template deduction guides +C++17 and above + +```cpp +template +etl::multimap(TPairs...) +``` + +### Example +```cpp +etl::multimap data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl::pair{6, 7} } +``` +Defines data as an multimap of `int`/`int` pairs, of length 4, containing the supplied data. + +## Make template +**C++11 and above** +```cpp +template , + typename... TPairs> +constexpr auto make_flat_map(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_multimap(etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7}); +``` + +## Member types + +```cpp +key_type TKey +mapped_type TMapped +value_type etl or std::pair +size_type size_t +difference_type ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator Random access iterator +const_iterator Constant random access iterator +reverse_iterator etl or std::reverse_iterator +const_reverse_iterator etl or std::reverse_iterator +``` + +## Constructor + +```cpp +etl::multimap(); +``` +**Description** +Default constructor. + + +```cpp +template +etl::multimap(TIterator begin, TIterator end); +``` +**Description** +Construct from the range [`begin`, `end`). + +## Element access + +```cpp +TMapped& at(key_parameter_t key) +const TMapped& at(key_parameter_t key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Asserts an `etl::map_out_of_range` if the key is not in the table. +If assert or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +TMapped& operator[](key_parameter_t key) +const TMapped& operator[](key_parameter_t key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +If the key does not exist then one is created using the default constructor. +If the multimap is full then asserts an `etl::map_full`. If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +iterator find(key_parameter_t key); +const_iterator find(key_parameter_t key) const +``` +**Description** +Searches the container for an element with a key equivalent to key and returns an iterator to it if found, otherwise it returns an iterator to `etl::multimap::end()`. + +--- + +```cpp +size_type count(key_parameter_t key) const +``` +**Description** +Count elements with a specific key. +Searches the container for elements with a key equivalent to key and returns the number of matches + +--- + +```cpp +iterator lower_bound(key_parameter_t key); +const_iterator lower_bound(key_parameter_t key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose `key` is not considered to go before key (i.e., either it is equivalent or goes after). + +--- + +```cpp +iterator upper_bound(key_parameter_t key); +const_iterator upper_bound(key_parameter_t key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. + +--- + +```cpp +pair equal_range(key_parameter_t key) const +pair equal_range(key_parameter_t key) +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +**For comparators that define `is_transparent`.** + +```cpp +template +iterator find(const K& key) +``` +**Description** +Searches the container for an element with a key equivalent to key and returns an iterator to it if found, otherwise it returns an iterator to `etl::multimap::end()`. +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +const_iterator find(const K& key) const +``` +**Description** +Searches the container for an element with a key equivalent to `key` and returns a const iterator to it if found, otherwise it returns a const iterator to `etl::multimap::end()`. + +--- + +```cpp +template +iterator lower_bound(const K& key) +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is not considered to go before `key` (i.e., either it is equivalent or goes after). +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +const_iterator lower_bound(const K& key) const +``` +**Description** +Returns a const iterator pointing to the first element in the container whose key is not considered to go before `key` (i.e., either it is equivalent or goes after). +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +iterator upper_bound(const K& key) +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +const_iterator upper_bound(const K& key) const +``` +**Description** +Returns a const iterator pointing to the first element in the container whose key is considered to go after `key`. +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +pair equal_range(const K& key) +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) +Since: `20.21.0` +C++11 or above. + +--- + +```cpp +template +pair equal_range(const K& key) const +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. +The return type is either `std::pair` (default) or `etl::pair` (`ETL_NO_STL`) + +--- + +```cpp +bool contains(key_value_parameter_t key) const +``` +**Description** +Check if the container contains the key. +Since: `20.21.0` + +--- + +```cpp +template +bool contains(const K& k) const +``` +**Description** +Check if the container contains the key. +Since: `20.21.0` +C++11 or above. +For comparators that define is_transparent. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the multimap. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the multimap. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the multimap. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the multimap. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns true if the size of the multimap is zero, otherwise false. + +--- + +```cpp +bool full() const +``` +**Description** +Returns true if the size of the multimap is SIZE, otherwise false. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the multimap. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the multimap. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the multimap. + +--- + +## Modifiers + +```cpp +template +void insert(TIterator begin, TIterator end) +``` +**Description** +Before: `20.20.0` +--- + + +```cpp +template +iterator insert(TIterator begin, TIterator end) +``` +**Description** +Since: `20.20.0` + +--- + +```cpp +iterator insert(mapped_parameter_t value) +``` +**Description** +Inserts values in to the multimap. +If the multimap is full then asserts an etl::map_full error. If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +template +iterator erase(TIterator begin, TIterator end) +``` +**Description** + +--- + +```cpp +iterator erase(TIterator element) +``` +**Description** +Erases values in the multimap. +Iterator are not checked for validity. + +--- + +```cpp +size_t erase(const key_type& key) +``` +**Description** + +--- + +20.21.0 +```cpp +template +size_t erase(K&& key) +``` +**Description** + +--- + +```cpp +void clear() +``` +**Description** +Clears the multimap to a size of zero. + +## Non-member functions + +```cpp +operator == +``` +**Description** +`true` if the contents of the maps are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the maps are not equal, otherwise `false`. diff --git a/docs/containers/maps/reference-flat-map.md b/docs/containers/maps/reference-flat-map.md new file mode 100644 index 00000000..57f7dda1 --- /dev/null +++ b/docs/containers/maps/reference-flat-map.md @@ -0,0 +1,429 @@ +--- +title: "reference_flat_map" +--- + +{{< callout type="info">}} + Header: `reference_flat_map.h` + Similar to: `std::reference_flat_map` +{{< /callout >}} + +A fixed capacity reference map based on a sorted vector. +The container stores references to objects, rather than the objects themselves. +The container is an associative lookup table with O(N) insertion and erase, and O(log N) search. +This container is best used for tables that are occasionally updated and spend most of their time being searched. +Uses `etl::less` as the default key comparison method. + +```cpp +etl::reference_flat_map +``` + +Inherits from `etl::ireference_flat_map`. +`etl::ireference_flat_map` may be used as a size independent pointer or reference type for any `etl::reference_flat_map` instance. + +## Template deduction guides +C++17 and above + +```cpp +template +etl::reference_flat_map(TPairs...) +``` + +### Example + +```cpp +etl::reference_flat_map data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl::pair{6, 7} }; +``` +Defines data as an reference_flat_map of int, of length 4, containing the supplied data. + +## Make template +C++11 and above + +```cpp +template , + typename... TPairs> +constexpr auto make_reference_flat_map(TValues&&... values) +``` + +### Example +auto data = etl::make_reference_flat_map(etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7}); + +## Member types + +```cpp +key_type TKey +mapped_type TMapped +value_type pair +size_type size_t +difference_type ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator Random access iterator +const_iterator Constant random access iterator +reverse_iterator ETL_OR_STD::reverse_iterator +const_reverse_iterator ETL_OR_STD::reverse_iterator +``` + +## Constructor + +```cpp +etl::reference_flat_map() +``` +**Description** +Default constructor. + +--- + +```cpp +etl::reference_flat_map(const flat_map& other) +``` +**Description** +Copy constructor. + +--- + +```cpp +template +etl::reference_flat_map(TIterator begin, TIterator end) +``` +**Description** +If the map is full then raises an `etl::reference_flat_map_full`. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +## Element access + +### at +```cpp +TMapped& at(const key_type& key) +const TMapped& at(const key_type& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +template +mapped_type& at(const K& key) +const mapped_type& at(const K& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### find + +```cpp +template +iterator find(const key_type& key) +const_iterator find(const key_type& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +template +iterator find(const K& key) +const_iterator find(const K& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### lower_bound + +```cpp +iterator lower_bound(const key_type& key) +const_iterator lower_bound(const key_type& key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is not considered to go before key (i.e., either it is equivalent or goes after). + +--- + +```cpp +template +iterator lower_bound(const K& key) +const_iterator lower_bound(const K& key) const +``` +Returns an iterator pointing to the first element in the container whose key is not considered to go before key (i.e., either it is equivalent or goes after). + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### upper_bound + +```cpp +iterator upper_bound(const key_type& key) +const_iterator upper_bound(const key_type& key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. + +--- + +```cpp +template +iterator upper_bound(const K& key) +const_iterator upper_bound(const K& key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### equal_range + +```cpp +pair equal_range(const key_type& key) +pair equal_range(const key_type& key) const +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. + +--- + +```cpp +template +pair equal_range(const K& key) +pair equal_range(const K& key) const +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### contains + +```cpp +bool contains(const value_type& key) const +``` +**Description** +Check if the container contains the key. +Since: `20.21.0` + +--- + +```cpp +template +bool contains(const K& k) const +``` +**Description** +Check if the container contains the key. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the map. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the map. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the map. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the map. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the map is zero, otherwise `false`. + +--- + +```cpp +bool full() const +``` +**Description** +Returns `true` if the size of the lookup is SIZE, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the lookup. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the map. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the map. + +## Modifiers + +```cpp +reference_flat_map& operator = (const reference_flat_map& rhs) +``` +**Description** +Copies the data from another flat map. + +--- + +```cpp +pair insert(const value_type& value) +``` +**Description** +Inserts `value` into the map. + +--- + +```cpp +iterator insert(iterator position, const value_type& value) +``` +**Description** +Inserts `value` into the map at th esuggested `position`. + +--- + +```cpp +template +void insert(TIterator first, TIterator last) +``` +**Description** +Inserts values in to the map. If the map is full then raises an `etl::flat_map_full`. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +size_t erase(const key_type& key) +``` +**Description** +Erase the element with `key`. + +--- + +```cpp +void erase(iterator i_element) +``` +**Description** +Erase the element at `i_element`. + +--- + +```cpp +void erase(iterator first, iterator last) +``` +**Description** +Erase elements in the range [`first`, `last`). + +--- + +```cpp +template +size_t erase(K&& key) +``` +**Description** +Erases values in the map. +Since: `20.21.0` + +--- + +```cpp +void clear() +``` +**Description** +Clears the lookup to a size of zero. +Iterator are not checked for validity. + +## Non-member functions +Lexicographically comparisons + +```cpp +operator == +``` +**Description** +`true` if the contents of the maps are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the maps are not equal, otherwise `false`. + +## Technical stuff + +Reference flat maps are different from the normal version in that the elements are not copied, but linked directly. +This means that the lifetime of the element inserted must be as great as that of the map that contains it. +Unlike most other reference containers, the map has a finite capacity. + +Flat maps are usually implemented internally as a sorted vector of key/value pairs. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial keys or values. +As inserting requires that all of the items above the insert position must be shifted, this can become an expensive operation for larger containers. + +To improve insertion performance ETL reference flat maps are implemented as vectors of pointers to key/value pairs, sorted by key value. An insertion will involve a copy of a range of pointers; an operation that can be made very fast. + +The downside is that access to an item via an iterator will involve one indirection and the overhead of the container will be one pointer per item. A normal flat map implementation does not have this overhead. + diff --git a/docs/containers/maps/reference-flat-multimap.md b/docs/containers/maps/reference-flat-multimap.md new file mode 100644 index 00000000..9d4ccd64 --- /dev/null +++ b/docs/containers/maps/reference-flat-multimap.md @@ -0,0 +1,433 @@ +--- +title: "reference_flat_multimap" +--- + +{{< callout type="info">}} + Header: `reference_flat_multimap.h` + Similar to: `std::reference_flat_multimap` +{{< /callout >}} + +A fixed capacity reference map based on a sorted vector. +The container stores references to objects, rather than the objects themselves. +The container is an associative lookup table with O(N) insertion and erase, and O(log N) search. +This container is best used for tables that are occasionally updated and spend most of their time being searched. +Uses `etl::less` as the default key comparison method. + +```cpp +etl::reference_flat_multimap +``` + +Inherits from `etl::ireference_flat_multimap`. +`etl::ireference_flat_multimap` may be used as a size independent pointer or reference type for any `etl::reference_flat_multimap` instance. + +## Template deduction guides +C++17 and above + +```cpp +template +etl::reference_flat_multimap(TPairs...) +``` + +### Example + +```cpp +etl::reference_flat_multimap data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl::pair{6, 7} }; +``` +Defines data as an reference_flat_multimap of int, of length 4, containing the supplied data. + +## Make template +C++11 and above + +```cpp +template , + typename... TPairs> +constexpr auto make_reference_flat_map(TValues&&... values) +``` + +### Example +auto data = etl::make_reference_flat_multimap(etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7}); + +## Member types + +```cpp +key_type TKey +mapped_type TMapped +value_type pair +size_type size_t +difference_type ptrdiff_t +reference value_type& +const_reference const value_type& +pointer value_type* +const_pointer const value_type* +iterator Random access iterator +const_iterator Constant random access iterator +reverse_iterator ETL_OR_STD::reverse_iterator +const_reverse_iterator ETL_OR_STD::reverse_iterator +``` + +## Constructor + +```cpp +etl::reference_flat_multimap() +``` +**Description** +Default constructor. + +--- + +```cpp +etl::reference_flat_multimap(const flat_map& other) +``` +**Description** +Copy constructor. + +--- + +```cpp +template +etl::reference_flat_multimap(TIterator begin, TIterator end) +``` +**Description** +If the map is full then raises an `etl::reference_flat_map_full`. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +## Element access + +### at +```cpp +TMapped& at(const key_type& key) +const TMapped& at(const key_type& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +template +mapped_type& at(const K& key) +const mapped_type& at(const K& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### find + +```cpp +template +iterator find(const key_type& key) +const_iterator find(const key_type& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +template +iterator find(const K& key) +const_iterator find(const K& key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::flat_map_out_of_range` if the key is not in the table. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### lower_bound + +```cpp +iterator lower_bound(const key_type& key) +const_iterator lower_bound(const key_type& key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is not considered to go before key (i.e., either it is equivalent or goes after). + +--- + +```cpp +template +iterator lower_bound(const K& key) +const_iterator lower_bound(const K& key) const +``` +Returns an iterator pointing to the first element in the container whose key is not considered to go before key (i.e., either it is equivalent or goes after). + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### upper_bound + +```cpp +iterator upper_bound(const key_type& key) +const_iterator upper_bound(const key_type& key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. + +--- + +```cpp +template +iterator upper_bound(const K& key) +const_iterator upper_bound(const K& key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after `key`. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### equal_range + +```cpp +pair equal_range(const key_type& key) +pair equal_range(const key_type& key) const +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +--- + +```cpp +template +pair equal_range(const K& key) +pair equal_range(const K& key) const +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to `key`. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +### contains + +```cpp +bool contains(const value_type& key) const +``` +**Description** +Check if the container contains the key. +Since: `20.21.0` + +--- + +```cpp +template +bool contains(const K& k) const +``` +**Description** +Check if the container contains the key. + +C++11 or above. +For comparators that define `is_transparent`. +Since: `20.21.0` + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the map. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the map. + +--- + +```cpp +iterator rbegin() +const_iterator rbegin() const +const_iterator crbegin() const +``` +**Description** +Returns a reverse iterator to the beginning of the map. + +--- + +```cpp +iterator rend() +const_iterator rend() const +const_iterator crend() const +``` +**Description** +Returns a reverse iterator to the end of the map. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the map is zero, otherwise `false`. + +--- + +```cpp +bool full() const +``` +**Description** +Returns `true` if the size of the lookup is SIZE, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the lookup. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the map. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the map. + +## Modifiers + +```cpp +reference_flat_multimap& operator = (const reference_flat_multimap& rhs) +``` +**Description** +Copies the data from another flat map. + +--- + +```cpp +pair insert(const value_type& value) +``` +**Description** +Inserts `value` into the map. + +--- + +```cpp +iterator insert(iterator position, const value_type& value) +``` +**Description** +Inserts `value` into the map at th esuggested `position`. + +--- + +```cpp +template +void insert(TIterator first, TIterator last) +``` +**Description** +Inserts values in to the map. If the map is full then raises an `etl::flat_map_full`. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +size_t erase(const key_type& key) +``` +**Description** +Erase the element with `key`. + +--- + +```cpp +void erase(iterator i_element) +``` +**Description** +Erase the element at `i_element`. + +--- + +```cpp +void erase(iterator first, iterator last) +``` +**Description** +Erase elements in the range [`first`, `last`). + +--- + +```cpp +template +size_t erase(K&& key) +``` +**Description** +Erases values in the map. +Since: `20.21.0` + +--- + +```cpp +void clear() +``` +**Description** +Clears the lookup to a size of zero. +Iterator are not checked for validity. + +## Non-member functions +Lexicographically comparisons + +```cpp +operator == +``` +**Description** +`true` if the contents of the maps are equal, otherwise `false`. + +--- + +```cpp +operator != +``` +**Description** +`true` if the contents of the maps are not equal, otherwise `false`. + +## Technical stuff + +Reference flat maps are different from the normal version in that the elements are not copied, but linked directly. +This means that the lifetime of the element inserted must be as great as that of the map that contains it. +Unlike most other reference containers, the map has a finite capacity. + +Flat maps are usually implemented internally as a sorted vector of key/value pairs. Whilst this makes searching fast, it can have a detrimental effect when items are inserted into a container that stores complex, non-trivial keys or values. +As inserting requires that all of the items above the insert position must be shifted, this can become an expensive operation for larger containers. + +To improve insertion performance ETL reference flat maps are implemented as vectors of pointers to key/value pairs, sorted by key value. An insertion will involve a copy of a range of pointers; an operation that can be made very fast. + +The downside is that access to an item via an iterator will involve one indirection and the overhead of the container will be one pointer per item. A normal flat map implementation does not have this overhead. + diff --git a/docs/containers/maps/unordered-map.md b/docs/containers/maps/unordered-map.md new file mode 100644 index 00000000..bf2810ad --- /dev/null +++ b/docs/containers/maps/unordered-map.md @@ -0,0 +1,375 @@ +--- +title: "unordered_map" +--- + +{{< callout type="info">}} + Header: `unordered_map.h` + Similar to: `std::unordered_map` +{{< /callout >}} + +A fixed capacity unordered map. +Uses `std::less` as the default key comparison method. + +This page just describes etl::unordered_map. + +```cpp +template , + typename TKeyEqual = etl::equal_to> +class unordered_map +``` + +Inherits from `iunordered_map`. +`etl::iunordered_map` may be used as a size independent pointer or reference type for any `etl::unordered_map` instance. + +## Template deduction guides +C++17 and above + +```cpp +template +etl::unordered_map(TPairs...) +``` + +### Example +```cpp +etl::unordered_map data{ etl::pair{0, 1}, etl::pair{2, 3}, etl::pair{4, 5}, etl::pair{6, 7} }; +``` +Defines data as an unordered map of `int`/`int` pairs, of length 4, containing the supplied data. + +## Make template +C++11 and above + +```cpp +template , + typename TKeyEqual = etl::equal_to + typename... TPairs> +constexpr auto make_unordered_map(TValues&&... values) +``` + +### Example +```cpp +auto data = etl::make_unordered_map(etl::pair{0, 1}, etl::pair{2, 3}, + etl::pair{4, 5}, etl::pair{6, 7}); +``` + +## Member types + +```cpp +value_type pair +key_type The type of the key value +mapped_type The type of the mapped value +hasher The type used to hash the key +key_equal The functor used to compare keys +reference A reference to a value_type +const_reference A reference to a const value_type +pointer A pointer to a value_type +const_pointer A pointer to a const value_type +size_type The type used for size information +iterator Random access iterator +const_iterator Constant random access iterator +local_iterator Iterator to a bucket +local_const_iterator A const iterator to a bucket +``` + +## Constructor + +```cpp +unordered_map() +``` +**Description** +Default constructor + +--- + +```cpp +unordered_map(const unordered_map& other) +``` +**Description** +Copy constructor + +--- + +```cpp +template +unordered_map(TIterator begin, TIterator end) +``` +**Description** +Construct from a range + +## Element access + +```cpp +mapped_type& at(key_parameter_t key) +const mapped_type& at(key_parameter_t key) const +``` +**Description** +Returns a reference or const reference to the indexed element. +Raises an `etl::unordered_map_out_of_range` if the key is not in the table. +If assert or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +mapped_type& operator[](key_parameter_t key) +``` +**Description** +Returns a reference to the indexed element. +If the key does not exist then one is created using the default constructor. +If the map is full then emits an `etl::unordered_map_full`. +If asserts or exceptions are not enabled then undefined behaviour occurs. + +--- + +```cpp +iterator find(key_parameter_t key); +const_iterator find (key_parameter_t key) const +``` +**Description** +Searches the container for an element with a key equivalent to key and returns an iterator to it if found, otherwise it returns an iterator to `etl::unordered_map::end()`. + +--- + +```cpp +bool contains(const_key_reference key) const +``` +**Description** +Check if the map contains the key. + +--- + +```cpp +template +bool contains(const K& key) const +``` +**Description** +Check if the map contains the key. +Enabled if the comparator is transparent. + +--- + +```cpp +size_type count(key_parameter_t key) const +``` +**Description** +Count elements with a specific key. +Searches the container for elements with a key equivalent to key and returns the number of matches + +--- + +```cpp +iterator lower_bound(key_parameter_t key) +const_iterator lower_bound(key_parameter_t key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is not considered to go before key (i.e., either it is equivalent or goes after). + +--- + +```cpp +iterator upper_bound(key_parameter_t key) +const_iterator upper_bound(key_parameter_t key) const +``` +**Description** +Returns an iterator pointing to the first element in the container whose key is considered to go after key. + +--- + +```cpp +pair equal_range(key_parameter_t key) +pair equal_range(key_parameter_t key) const +``` +**Description** +Returns the bounds of a range that includes all the elements in the container which have a key equivalent to key. + +## Iterators + +```cpp +iterator begin() +const_iterator begin() const +const_iterator cbegin() const +``` +**Description** +Returns an iterator to the beginning of the map. + +--- + +```cpp +iterator end() +const_iterator end() const +const_iterator cend() const +``` +**Description** +Returns an iterator to the end of the map. + +## Capacity + +```cpp +bool empty() const +``` +**Description** +Returns `true` if the size of the map is zero, otherwise `false`. + +--- + +```cpp +bool full() const +``` +**Description** +Returns `true` if the size of the map is `SIZE`, otherwise `false`. + +--- + +```cpp +size_t size() const +``` +**Description** +Returns the size of the map. + +--- + +```cpp +size_t max_size() const +``` +**Description** +Returns the maximum possible size of the map. + +--- + +```cpp +size_t available() const +``` +**Description** +Returns the remaining available capacity in the map. + +--- + +```cpp +size_type get_bucket_index(key_parameter_t key) const +``` +**Description** +Returns the bucket index for the key. + +--- + +```cpp +size_type bucket_size(key_parameter_t key) const +``` +**Description** +Returns the size of the bucket key. + +--- + +```cpp +size_type max_bucket_count() const +``` +**Description** +Returns the maximum number of the buckets the container can hold. + +--- + +```cpp +float load_factor() const +``` +**Description** +Returns the load factor = size / bucket_count + +--- + +```cpp +hasher hash_function() const +``` +**Description** +Returns the function that hashes the keys. + +--- + +```cpp +key_equal key_eq() const +``` +**Description** +Returns the function that compares the keys. + +## Modifiers + +```cpp +template +void assign(TIterator first, TIterator last) +``` +**Description** +Assigns elements from the range [`first`, `last`)]. +Clears the container before assigning. + +--- + +```cpp +pair insert(const value_type& key_value_pair) +iterator insert(const_iterator, const value_type& key_value_pair) +``` +**Description** +Assigns elements from the range [`first`, `last`)]. +Clears the container before assigning. + +--- + +```cpp +template