74 Commits

Author SHA1 Message Date
John Wellbelove
1bd1072303
Reduce the compiled code size for etl::variant (#1623)
* Replaced pointer table with a recursive visitor call to reduce compiled code size.

* Removed the 32 type limit for visitor and operator visits

Deleted variant_select_do_operator and variant_select_do_visitor headers

* Restored CMakeLists.txt

Applied clang-format

* Updated documentation

Added guards to 'single index' do_operator_at and do_visitor_at

* Unified 'if (Index == index())' order

* Merged new tests from PR #1625

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-10-12 18:40:19 +01:00
John Wellbelove
88c1b34411
Feature/to string float uses double math (#1610)
* Added overloaded etl::floor() and etl::ceil()

Added tests for float, double, long double

* Documented functions from math.h

* Added more math wrappers.

Move wrappers to clib namespace

* Cleanup of duplicated code.

* clang-format

* Code review updates

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-10-12 09:36:21 +01:00
John Wellbelove
a2da3ed940
Optimise cyclic value (#1607)
* Updated ignore for hard link for CLion

* Initial working version

* Optimised advance template call

* Further optimsed advance

Updated docs and tests

* Moved comparison operators out of the class.

* Implement spaceship operator <=> for No-STL case (#1604)

This was disabled explicitly in recent commit
232c948674cff1b4b72c2d6b3acfa7342d096dd1 to prevent using
the <compare> header from STL.

Now, re-enabling by implementing an ETL version of it in compare.h

* Sponsorship message updates

* Fix duplicated check runs

* Refactored the advance function to fix issues with signed unsigned mod operations.

* clang-format

* Updated documentation for cyclic_value

* Modified code comments

* Fixed a logic issue in advance() where a less than maximum step from the minimum value for a cyclic value covering the full type's range would take the wrong logical path (Step would roll over), although calculating the correct result.

This could be cofusing to someone debugging cyclc_value.

* Added runtime ans static asserts for reverse ordered limts.

* clang-format

* Spelling fix 'fast' -> 'last'

* Code review updates

* clang-format

* Code review updates

* Code review updates

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
2026-10-09 17:39:04 +01:00
Roland Reichwein
7e328341ae
Add be_uint24_t etc. to unaligned_type.h (#1592)
* Add be_uint24_t etc. to unaligned_type.h

A typical use case is to endian convert 24, 40, 48 bits etc.

This change generalizes the pre-existing types in unaligned_type.h
to those odd sizes.

* Add documentation for odd sized unaligned_type specializations
2026-09-30 08:26:46 +01:00
John Wellbelove
3e6b486786 Fix Codacy badge display 2026-09-29 12:38:34 +01:00
John Wellbelove
f0d9d681a8 Updated sponsors pages 2026-09-28 10:38:48 +01:00
Sergei
c313e6b98c
Add docs and tutorial for etl::intrusive_avl_tree (#1608)
* Add docs and tutorial for etl::intrusive_avl_tree

Documents the intrusive AVL tree added in PR #1425: a full API reference
page under Containers/Trees, and a tutorial demonstrating ordered access
to intrusively-linked objects with unpredictable lifetimes, including
move support and destructor-driven automatic removal from the tree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Add complexity shortcode and document its usage

Introduces a {{< complexity >}} Hugo shortcode (with light/dark styling
for constant/logarithmic/linear/linearithmic/polynomial/exponential
classes) for rendering Big-O complexity inline, applies it throughout
the intrusive_avl_tree API reference in place of raw "O(...)" text, and
documents the Description/Complexity structure and supported classes in
DOCUMENTATION.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix issues found by @CodeRabbit

* Put complexity notes on their own lines in intrusive_avl_tree docs

Move the complexity shortcode from the inline "**Complexity:**" label
to its own line under a "**Complexity**" label. Notes that give several
alternatives (e.g. amortized vs. worst-case) now show each one on a
separate line. Update the guideline in DOCUMENTATION.md to match.

* Update complexity examples in DOCUMENTATION.md

Add the hard line break after the "**Complexity**" label in the
example, and rewrite the list of supported complexity classes in the
new two-line format, including an example with several alternatives.

* Add logarithmic complexity example to DOCUMENTATION.md

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-09-27 09:42:34 +01:00
Drew Rife
d9a9488582
Add referenced clamped values with shared ranges (#1597)
* Support runtime floating-point clamped_value before C++20

* Add referenced clamped values with shared ranges
2026-09-26 10:45:48 +01:00
John Wellbelove
b1f1977123 Merge branch 'master' into development 2026-09-17 11:53:19 +01:00
Roland Reichwein
2e2c5d0199
Implement spaceship operator <=> for No-STL case (#1604)
This was disabled explicitly in recent commit
232c948674cff1b4b72c2d6b3acfa7342d096dd1 to prevent using
the <compare> header from STL.

Now, re-enabling by implementing an ETL version of it in compare.h
2026-09-17 12:38:18 +02:00
Marco Nilsson
eb793d2b82
Help the compiler optimize unaligned_type. (#1598)
* Help the compiler optimize unaligned_type.

This fixes a regression in 266b0f99 when the type was made constexpr. When
switching to a loop to construct the value the compiler was unable to detect
what was going on. We now unroll the loop at compile time into what's
essentially a hand rolled shift and OR operation which the compiler detects
and replaces with a byte swap. Tested on gcc (x86+arm) and clang (x86).

Introduce a static value_from which can be used to convert a value from an
existing buffer. There were previously three options for this, all bad or
awkward in different ways:

- val = etl::be_uint32_t(address)
Copies to temporary storage.

- val = *reinterpret_cast<const etl::be_uint32_t*>(address);
Unreadable.

- etl::be_uint32_t::copy_store_to_value(address, output);
Requires an output parameter.

The new addition is:
- val = etl::be_uint32_t::value_from(address);

Additionally, update the documentation with value_from and the missing,
existing constructors.

* Please clang-format.

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-09-13 10:33:42 +01:00
John Wellbelove
14b3f4d335 Sponsorship message updates 2026-09-12 11:26:53 +01:00
John Wellbelove
7d604f2e4f Updated release notes 2026-09-08 20:14:24 +01:00
John Wellbelove
155d1edb88 Merge branch 'development'
# Conflicts:
#	docs/sponsors.md
2026-09-08 19:52:50 +01:00
John Wellbelove
aef7e493a0 Updated release notes 2026-09-08 19:50:17 +01:00
Drew Rife
ffea27142a
Support runtime floating-point clamped_value before C++20 (#1595) 2026-09-08 19:45:31 +01:00
John Wellbelove
2696828f27 Updated release notes
Removed redundant ETL_NOEXCEPT_IF(ETL_NOT_USING_EXCEPTIONS) from clamped_value.h
2026-09-08 15:37:23 +01:00
Drew Rife
11623e6862
Implement clamped_value utility (#1565)
* feat: add clamped_value utility

* style: format clamped_value include list

* feat: enhance clamped_value with runtime bounds and comparison operators and DRY up the implementation

* refactor: call set in runtime ctor

instead of duplicated the clamping logic

* Add C++20 floating-point clamped_value support

* Document and stress clamped_value edge cases

* Change ETL_NOEXCEPT_IF(ETL_NOT_USING_EXCEPTIONS) to ETL_NOEXCEPT

* Change ETL_NOEXCEPT_IF(ETL_NOT_USING_EXCEPTIONS) to ETL_NOEXCEPT

* Revert changes

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-09-08 10:21:33 +01:00
John Wellbelove
ee87ea90aa Added sponsors page to documentation 2026-09-07 15:39:46 +01:00
Marco Nilsson
d06cd9f303
Allow expected to be constructed from a convertible value or expected (#1587) 2026-09-07 16:23:20 +02:00
John Wellbelove
d6badd3005 Added sponsors page to documentation 2026-09-06 20:36:45 +01:00
John Wellbelove
c561873d72 Updated menus for Home page for documentation 2026-09-06 20:36:35 +01:00
John Wellbelove
043094129a Added sponsors page to documentation 2026-09-06 20:35:56 +01:00
John Wellbelove
75cd310fd4 Updated menus for Home page for documentation 2026-09-06 20:29:32 +01:00
John Wellbelove
ae9207dd0a Changed version from 20.50.0 to 20.49.0 2026-09-05 16:15:26 +01:00
John Wellbelove
75c07eca54
Absolute and casting updates (#1583) 2026-09-03 14:38:51 +02:00
Roland Reichwein
06e54f6b23
Add missing type traits (#1573)
etl::is_scoped_enum
etl::is_trivially_default_constructible
etl::is_trivially_move_constructible
etl::is_trivially_move_assignable
etl::is_trivially_assignable
etl::is_layout_compatible
etl::is_pointer_interconvertible_base_of

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-08-31 19:09:16 +01:00
Konstantinos Kanavouras
1a1f259ccb
Remove spurious link in documentation (#1576)
* Update _index.md

* Update _index.md

* Cherry pick the Docker fixes for PowerPC (#1563)

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>

* Remove spurious link

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-08-28 09:41:00 +01:00
Roland Reichwein
74a95cf360
For optional monadic operations, add docs, tests, and complete type (#1568) 2026-08-27 13:17:43 +02:00
Roland Reichwein
c6c1ee1b28
Add missing etl::ranges::distance overload (#1569)
* Update _index.md

* Update _index.md

* Cherry pick the Docker fixes for PowerPC (#1563)

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>

* Add missing etl::ranges::distance overload

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-08-26 20:16:54 +01:00
Roland Reichwein
fa3ac28f55
Add etl::is_standard_layout and other type traits according to std (#1545)
* Update _index.md

* Update _index.md

* Cherry pick the Docker fixes for PowerPC (#1563)

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>

* Add etl::is_standard_layout and further type traits

Added type traits:

* etl::is_standard_layout
* etl::is_null_pointer
* etl::is_union
* etl::is_scalar
* etl::is_empty
* etl::is_polymorphic
* etl::is_abstract
* etl::is_final
* etl::is_aggregate
* etl::is_destructible
* etl::is_nothrow_destructible
* etl::has_virtual_destructor
* etl::is_swappable
* etl::is_swappable_with
* etl::is_nothrow_swappable
* etl::is_nothrow_swappable_with
* etl::has_unique_object_representation
* etl::is_bounded_array
* etl::is_unbounded_array
* etl::is_trivial

Document etl::is_pod

Note that etl::swap needed adjustment to enable nothrow detection via
SFINAE constraints. This change closes in to the standard.

* Fix preprocessor directive formatting in header

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-08-24 13:11:11 +01:00
rleigh-electradx
25e2d6e8a3
Adopt the Library Fundamentals TS make_array design for the sequence factories (#1553)
* Adopt the Library Fundamentals TS make_array design for the sequence factories

make_array, make_deque, make_vector, make_list, make_forward_list and
make_indirect_vector now follow the Library Fundamentals TS
std::experimental::make_array design: a defaulted leading template
parameter selects the element type explicitly, falling back to the
decayed common type of the arguments when it is not supplied. A shared
trait (etl::private_make::element_type) performs the selection lazily,
so common_type is not instantiated when the element type is explicit.

This fixes the explicit-element-type calling style for the four
common-type factories, where make_vector<char>(lvalue) never compiled:
the explicit argument pinned the first pack parameter to char, making
it a char&& that no lvalue can bind to. It also gives make_array and
make_deque the deduced form (e.g. make_array(1, 2L) is array<long, 2>)
for free. All arguments are converted with static_cast, as in the
make_array const-lvalue fix, so const-qualified lvalues and narrowing
initialisers work in both forms.

Intentional behaviour change: an explicit element type now converts
every argument instead of pinning only the first. make_vector<char>(0,
1, ...) previously produced vector<int> - the explicit char affected
only the first argument and the element type was still the common type
- and now produces vector<char>. test_make_vector documented the old
behaviour and has been updated.

The keyed set and map factories are unchanged: their key/mapped types
are separate mandatory template parameters ahead of a fully-deduced
pack, so the explicit-type style already works, and retrofitting
deduction there would interact with the defaulted comparator/hash
parameters.

Adds explicit-element-type tests for the four common-type factories
(const/non-const lvalues plus narrowing initialisers) and
deduced-element-type tests for make_array and make_deque, and updates
the four documented signatures.

* Address review comments on the make_xxx factory design

- Forward same-type arguments in the make_xxx factories instead of
  casting them. static_cast produced a prvalue that, before C++17, had
  to be materialised through the move constructor, rejecting
  copyable-but-non-movable element types. The new
  private_make::convert helper forwards arguments that already have
  the element type and static_casts the rest.
- Drop ETL_NOEXCEPT from make_array: conversions can throw, and the
  other factories do not declare it.
- Remove the redundant etl::decay in element_type<void, ...>;
  etl::common_type already decays its arguments.
- Stop leaking the etl::private_make implementation namespace into the
  documented factory signatures.

* Add a test for make_array with an explicit element type and no arguments

etl::make_array<int>() produces an empty etl::array<int, 0> and now has
a regression test. A call with neither an element type nor arguments
remains ill-formed, matching the Library Fundamentals TS: there is
nothing to deduce the element type from. The array documentation now
states this explicitly.

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
2026-08-24 08:53:25 +01:00
myrkle11
294b788942
Update etl::expected documentation (#1564)
* Update _index.md

* Update _index.md

* Cherry pick the Docker fixes for PowerPC (#1563)

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>

* Update expected documentation to reflect the current state of the code

* Fix code blocks for expected class section

* Change wording slightly

* make changes ala coderabbitai

* Fixed typos

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-08-23 23:30:39 +01:00
Drew Rife
ffd64f374b
circular_buffer: add initialization and assignment overloads (#1556)
* feat(circular_buffer): add initialization and assignment overloads

* fix(circular_buffer): handle self-referential assignment

* docs: document constructors and assign methods

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-08-22 20:10:38 +01:00
Roland Reichwein
22fc884d45
Various cleanup (#1562)
* Fix wrong templating

* Fix stray double parens

* Documentation cleanup: Some key/value actually are value only
2026-08-22 17:47:16 +02:00
John Wellbelove
69c712a916
Update _index.md 2026-08-13 09:16:46 +02:00
John Wellbelove
4df0528484
Update _index.md 2026-08-13 09:13:51 +02:00
rleigh-electradx
c8bc1bd896
Correct the documented make_xxx factory signatures and examples (#1530)
* Corrected the documented make_xxx factory signatures and examples

The Make template sections across the container documentation had
drifted from the implementations, largely through copy-paste:

- map.md, multimap.md and flat-multimap.md all documented
  make_flat_map; multiset.md documented make_set; flat-multiset.md
  documented make_flat_set; unordered-multimap.md documented
  make_unordered_map. Names and examples now match each container.
- Every signature omitted the C++11-required trailing return type
  despite the sections being labelled C++11 and above; several also
  used a parameter name (TValues) that did not match any template
  parameter, and the unordered map headers were missing a comma.
- forward-list.md documented a make_array-style signature with an
  explicit element type; the real function deduces the element type as
  the common type of the arguments, as documented for make_list.
- The flat_set/flat_multiset template headers were missing the
  variadic parameter pack, and their examples passed a braced list to
  a variadic function, which does not compile; set.md used TKeyCompare
  where the implementation uses TCompare.
- deque.md and the reference container docs were missing code fences.
- Updated the four reference_flat_* function.  However these functions
  cannot be instantiated at all (the reference containers have no
  initializer_list constructor, since one would dangle by design), so
  the documented examples have never compiled.

Every remaining documented example verified to compile with clang 22
(C++17) against the current headers.

* Fixed C++17-only syntax in factory examples and flagged the non-compilable ones

Review feedback on the make_xxx documentation examples:

- All the map-family factory examples are labelled C++11 and above but
  constructed their pairs with class template argument deduction
  (etl::pair{0, 1}), which requires C++17. The pairs in the make_flat_map,
  make_flat_multimap, make_map, make_multimap, make_unordered_map,
  make_unordered_multimap, make_reference_flat_map and
  make_reference_flat_multimap examples now name their template arguments
  explicitly. The template deduction guide examples are unchanged, as
  those sections are labelled C++17 and above. Verified with clang 22 in
  C++14 mode, which, like C++11, has no deduction guides.

- The four make_reference_flat_* examples are now preceded by a warning
  callout stating that they do not currently compile: the functions
  cannot be instantiated because the reference containers have no
  initializer_list constructor. The examples themselves are retained,
  rewritten to pass named lvalues rather than temporaries, since the
  reference containers store references to external objects and the
  temporaries would dangle even if the functions compiled. The defect
  is being reported separately.

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-08-04 11:45:49 +01:00
rleigh-electradx
62925ec1ad
Changed make_list to take its arguments by forwarding reference (#1528)
make_list was the only make_xxx container factory taking its argument
pack by value rather than by forwarding reference, costing an extra
move per lvalue argument: each lvalue was copy-constructed into the
parameter and then moved into the initializer_list backing array,
where the forwarding-reference signature copies it there directly.
Rvalue prvalue arguments count the same either way in practice, as
copy elision constructs them directly into the by-value parameter.

Change the pack to T&&..., matching make_vector, make_forward_list and
make_indirect_vector. The deduced reference types decay through
common_type, so the element type deduction is unchanged.

Adds tests for const/non-const lvalues of the element type (guarding
against the forward<T> defect fixed for make_array and make_deque),
mixed-type common_type deduction, and an instrumented type counting
copy/move constructions, which fails with the by-value signature (one
extra move per lvalue argument) and passes with the fix.

Also corrects the make_list documentation, which described a
make_array-style signature with an explicit element type parameter
that never matched the implementation.

Verified with clang 22 (C++17): all 93 list tests pass; C++14/20
syntax checks pass.

Note: mixed-type lvalue arguments are affected by a separate
pre-existing defect in etl::common_type (its two-type specialization
recurses with decay<T2> twice instead of decay<T1>, decay<T2>), which
already affects the other common_type-based factories and is being
fixed separately.

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-08-04 10:57:25 +01:00
Roland Reichwein
08b9c371a0
Various fixes and cleanup (#1507)
* Fix histogram test

Use different Start index so skipped start_index copy would not get
unnoticed in the test.

* Fix several test_vector_* for valid data

Instead of comparing the moved-from data which is invalid, compare with
the valid initial_data.

* Fix test_vector to check for the correct iterator position after erase

This was done before, but a recent change dropped it.

* Fix bit_stream: Guard nbits > 0 to prevent division by zero

* Cleanup

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-07-20 11:19:41 +02:00
Roland Reichwein
49f690a921
Add safe integer comparisons (#1506)
Adding cmp_equal, cmp_not_equal, cmp_less, cmp_greater, cmp_less_equal,
cmp_greater_equal and in_range.

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-07-18 16:37:53 +02:00
Roland Reichwein
66f904b1a3
Support structured bindings for array (#1505) 2026-07-16 21:21:19 +02:00
Roland Reichwein
38f7318a85
Add etl::apply (#1509)
Fixes: #1272

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-07-16 09:15:24 +01:00
John Wellbelove
86c3dad1e9
Remove the documentation page for type_id, as it doesn't exist in the ETL. (#1502)
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-07-15 08:24:36 +01:00
John Wellbelove
afa17c5042 Squashed commit of the following:
commit c5dc331004b4d9611ab996935bedada203676c71
Author: John Wellbelove <john.wellbelove@etlcpp.com>
Date:   Sat Jul 11 12:32:20 2026 +0100

    Updated release notes

commit 4bf6ed6ce8d79857658d763e368ee56617542b2c
Author: vcoselev <145198867+vcoselev@users.noreply.github.com>
Date:   Sat Jul 11 12:05:39 2026 +0100

    Fix for 1405: etl::exchange doesn't work with unique_ptr (#1477)

    * Separate bit order and endianness in bit_stream.h (#1495)

    * Factor out ranges tests from test_algorithm.cpp to test_algorithm_ranges.cpp (#1497)

    * Fix exchange to use forwarding reference (U&&) and move

    - etl::exchange was using the copy constructor. Changed for etl::move.
    - The assignment to the new object is now done with forward.
    - Added a test with unique_ptr.

    ---------

    Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit 2ed9019df04d470530c41c1f27d35adc30b9a32d
Author: Moritz Pflanzer <moritz@pflanzer.eu>
Date:   Fri Jul 10 11:42:32 2026 +0200

    Update operator[] docs for map class (#1499)

    * Separate bit order and endianness in bit_stream.h (#1495)

    * Update operator[] docs for map class

    No const variant is implemented for the operator[].

    ---------

    Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>

commit 423e18d96dc645f1c733cb0d8ae6b675b9eb7e83
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Fri Jul 10 11:14:08 2026 +0200

    Factor out ranges tests from test_algorithm.cpp to test_algorithm_ranges.cpp (#1497)

commit 338bfdbb1f4df3c5c08a68a9038f13b8dae1c28b
Author: John Wellbelove <jwellbelove@users.noreply.github.com>
Date:   Fri Jul 10 10:12:04 2026 +0100

    Add coverage report to docs (#1498)

    * Updated release notes

    * Added link to coverage report

    ---------

    Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>

commit 269025424f4c6f61cebac090f4df82985fb3b239
Merge: c004cc9d faa4c15b
Author: John Wellbelove <john.wellbelove@etlcpp.com>
Date:   Thu Jul 9 14:18:32 2026 +0100

    Merge branch 'development' of https://github.com/ETLCPP/etl into development

commit c004cc9d508efcf398630758a47aae95b37a7eb8
Author: John Wellbelove <john.wellbelove@etlcpp.com>
Date:   Thu Jul 9 10:06:17 2026 +0100

    Updated release notes

commit faa4c15b49c8ad15475c83ae23e00f5a46f803ca
Author: John Wellbelove <john.wellbelove@etlcpp.com>
Date:   Thu Jul 9 10:06:17 2026 +0100

    Updated release notes

commit 1523e63e35a15cfd1fa72d230a3c79efa7b9c3e0
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Wed Jul 8 20:48:33 2026 +0200

    Support non-assignable alternatives in variant (#1496)

commit 878a0ba5a28f6b0dcae9f472a6a6a1f107de0a74
Author: John Wellbelove <john.wellbelove@etlcpp.com>
Date:   Wed Jul 8 11:07:01 2026 +0100

    Updated version and release notes

commit 5287fe4b3b9f58330881d2a62abf6ce8e1159b8d
Author: John Wellbelove <jwellbelove@users.noreply.github.com>
Date:   Wed Jul 8 09:06:50 2026 +0100

    Allow etl::vector to store pointers to functions and member functions (#1492)

    * Refactored vector.h

    Deleted ivectorpointer.h

    * Minor changes

    * Fixed code incompatible with C++03

    * Clang-format changes

    * Removed redundant double-qualified name

    * Fixed is_is_object_pointer_v to is_object_pointer_v

    * Added new test files to meson.build

    * Added overflow checks to vector_ext copy and move constructors and assignments

    Added assert throw tests.

    * Added diagnostic pushes to eliminate GCC warning false positives

    * Changed the GCC C++23 Github action to use GCC14

    * Applied clang-format

    * Added guard to pop_heap

    * Added guard to adjust_heap

    * Attempt to fix GCC diagnostic

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * clang-format

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Missing newline at end of file

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Attempt to fix GCC diagnostic

    Re-enable ranges algorithm tests

    * Attempt to fix GCC diagnostic

    * clang-format

    * Changed gcc --version to gcc-14 --version

    ---------

    Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
    Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>

commit 40dddd7f9601985ae7350e60a404af9028bc9fe9
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Tue Jul 7 23:41:17 2026 +0200

    Add optional etl_profile label_flag for Bazel profile injection (#1491)

    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit 84fca4cd62f72c382c062376ca934803116a20d5
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Tue Jul 7 21:45:47 2026 +0200

    Add missing memory functions, according the standard (#1490)

    Adding:

    - etl::align
    - etl::assume_aligned
    - etl::is_sufficiently_aligned
    - etl::launder
    - etl::pointer_traits
    - etl::start_lifetime_as

    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit dca6653b3759b2cdc79307fec7425589feea478d
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Tue Jul 7 21:00:09 2026 +0200

    Add missing interfaces to etl::chrono (#1489)

    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit c52b2ac7b1f675e6b1d34052239423b7f3634033
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Tue Jul 7 18:06:05 2026 +0200

    Fix etl::mem_cast cross-size copy constructor and assignment (#1488)

    The templated cross-size copy constructor and assignment operator were
    broken in two ways:

    - They accessed other.buffer / rhs.buffer, which is private in a
      different mem_cast instantiation, so the cross-size overloads failed
      to compile whenever they were actually instantiated.
    - They copied Size_ (the destination size) bytes from a source buffer
      that is only Other_Size bytes large, reading past the end of the
      source when the destination was larger.

    Use the public data() accessor and copy Other_Size bytes. The existing
    static_assert(Size >= Other_Size) guarantees the destination is big
    enough.

    Add test_mem_cast_copy_and_assign_from_smaller regression test.

    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit 165674cb23dda1fd4f7e5a1182f49554a796bfe8
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Tue Jul 7 16:41:50 2026 +0200

    Fix etl::pearson::reset() not resetting the first-byte flag (#1487)

    reset() cleared the hash array but left the `first` flag false, so a
    calculator reused after reset() took the XOR update path on its next
    add() instead of the initialisation path. This produced an incorrect
    hash for any pearson object that was reset and reused.

    Reset `first` to true in reset() so a reset calculator behaves like a
    freshly constructed one.

    Add test_pearson_reset regression test.

    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit 032ec4cc80f1c0f1baa0383bdbc5f9239b68f268
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Tue Jul 7 13:40:04 2026 +0200

    Fix etl::bitset single-element from_string shift on empty string (#1486)

    The single-element from_string overloads (char, wchar_t, char16_t,
    char32_t) computed element_type(1) << (string_length - 1U) before the
    copy loop. For an empty string, or when active_bits is 0, string_length
    is 0, so the shift count underflows to SIZE_MAX. Shifting by more than
    the element width is undefined behaviour, which also breaks constexpr
    evaluation.

    Guard the mask with a zero-length check so the shift is only performed
    when string_length > 0. The multi-element from_string overloads were
    already safe.

    Add test_construct_from_empty_string regression test.

    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit 98cb365d4c28e7b72f8547b734a03a4068acd3f5
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Tue Jul 7 12:32:56 2026 +0200

    Fix etl::histogram copy/move not preserving start_index (#1485)

    The run-time-offset specialization of etl::histogram stores a start_index
    member used to map keys to bins (accumulator[key - start_index]). Its copy
    constructor, move constructor, copy assignment, and move assignment copied
    only the accumulator and left start_index uninitialized, so a copied or
    moved histogram indexed the wrong bin in operator[]/add(), causing
    out-of-bounds access (undefined behavior).

    All four special member functions now also copy start_index. The
    compile-time-offset specialization is unaffected, as its start index is a
    template constant rather than a data member.

    Add regression tests covering copy/move construction and assignment.

    Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

commit 5cd2f28cd54e4019f7be126bcf7394a6a8318eb9
Author: Drew Rife <darife@jlg.com>
Date:   Tue Jul 7 03:14:48 2026 -0400

    Refactor variant::emplace to perfect forward args instead of copy/move construct (#1494)

    * refactor: emplace logic to use do_emplace for in-place construction with forwarded arguments #1493

    * Add test for variant_variadic

    ---------

    Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>

commit a47c0aae81b886259918961d5fcee20faa06fdd0
Author: Roland Reichwein <Roland.Reichwein@bmw.de>
Date:   Mon Jul 6 17:32:26 2026 +0200

    Fix etl::message_timer firing following timers early on unregister (#1484)

    active_list.remove(id, has_expired) adjusts the next timer's delta only
    when has_expired is false. When unregistering an active, non-expired timer,
    unregister_timer() incorrectly passed true, skipping that adjustment, so
    every timer after the removed one in the active list fired early by the
    removed timer's delta.

    Pass false instead, matching the etl::callback_timer family. tick() still
    passes true, since the timer has genuinely expired there. The bug affected
    all four variants: message_timer, message_timer_interrupt,
    message_timer_atomic and message_timer_locked. Existing tests missed it
    because they only ever unregistered the tail timer, where the delta
    adjustment is a no-op.

    Add a regression test that unregisters a non-tail active timer and checks
    the following timer still fires at its original absolute time.
2026-07-11 13:02:42 +01:00
Roland Reichwein
da0c764a30
Separate bit order and endianness in bit_stream.h (#1495) 2026-07-08 09:22:25 +01:00
John Wellbelove
ceb21914fb Updated release notes 2026-06-30 13:55:56 +01:00
John Wellbelove
f3028d22e4 Development release of 20.48.0 2026-06-30 11:33:30 +01:00
Drew Rife
e6a7642121
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 <Roland.Reichwein@bmw.de>
2026-06-24 16:51:02 +01:00
Roland Reichwein
5e5012c62c
Format user defined types in format.h (#1470)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-06-24 11:27:53 +02:00