6303 Commits

Author SHA1 Message Date
John Wellbelove
6f9e1568c6
Merge branch 'development' into feature/to_string-float-uses-double-math 2026-10-11 15:07:42 +02:00
Roland Reichwein
a8ab0bbeea
error_handler.h: Remove return statements after throw (#1613) 2026-10-11 09:51:55 +02:00
John Wellbelove
020fd5409b
Merge branch 'development' into feature/to_string-float-uses-double-math 2026-10-09 18:52:57 +02: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
John Wellbelove
7fa523d421
Merge branch 'development' into feature/to_string-float-uses-double-math 2026-09-30 10:12:46 +02:00
Roland Reichwein
360e18df18
Fix is_swappable for MSVC in C++14 (#1600)
* Fix is_swappable for MSVC in C++14

* MSVC 19.44, Debug build, C++20 specific format adjustment

* 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>

* Updated sponsors pages

* Refactor the documentation css to group styles for light and dark themes

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-09-30 09:12:00 +01:00
Roland Reichwein
b0548949df
Fix circular reference in callback_timer_* (#1611)
* 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>

* Updated sponsors pages

* Refactor the documentation css to group styles for light and dark themes

* Fix circular reference in callback_timer_*

Fixes #967

* Unify timer tick() ordering and detect duplicate inserts

Address review feedback on #1611.

Replace the is_active() guard with a consistent tick() ordering across
all timer controllers: a repeating timer is now reinserted before its
callback is invoked or its message is sent, matching etl::callback_timer.
A callback that restarts the timer then replaces the existing entry
instead of causing a second insert. Applied to message_timer_atomic,
message_timer_interrupt and message_timer_locked as well, which are
affected in the same way.

Reject an insert of a timer that is already in the active list, rather
than linking it to itself, and record that it happened. The regression
tests now assert duplicate_insert_detected() instead of relying on the
resulting circular reference hanging the test.

---------

Co-authored-by: Sergei <sergej.shirokov@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-09-30 08:27:23 +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
763f6fead7
Merge branch 'development' into feature/to_string-float-uses-double-math 2026-09-29 13:16:21 +02:00
John Wellbelove
202f997e66 Refactor the documentation css to group styles for light and dark themes 2026-09-28 10:43:23 +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
72300a653d Code review updates 2026-09-25 08:32:39 +01:00
John Wellbelove
e8be428b35 clang-format 2026-09-24 09:15:29 +01:00
John Wellbelove
9133c3df46 Cleanup of duplicated code. 2026-09-23 11:22:58 +01:00
John Wellbelove
59204cf3a0 Added more math wrappers.
Move wrappers to clib namespace
2026-09-22 10:06:13 +01:00
John Wellbelove
f9c830a10c Documented functions from math.h 2026-09-22 08:15:02 +01:00
John Wellbelove
796f682335 Added overloaded etl::floor() and etl::ceil()
Added tests for float, double, long double
2026-09-21 17:23:00 +01:00
Mike Bloom
22bdef2ee4
Simplify noexcept expressions using ETL_NOT_USING_EXCEPTIONS (#1606)
* Simplify noexcept containing ETL_NOT_USING_EXCEPTIONS

* Revert some format

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
2026-09-17 12:57:10 +01:00
John Wellbelove
b1f1977123 Merge branch 'master' into development 2026-09-17 11:53:19 +01:00
John Wellbelove
525fd0304a Updated ignore for hard link for CLion 2026-09-17 11:52:33 +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
Hossein
232c948674
Exclude operator <=> from chrono when STL not available (#1602)
* Exclude operator <=> from chrono when STL not available

* apply the fix to tests

* chore: rerun pipeline
2026-09-12 10:22:39 +01:00
John Wellbelove
7d604f2e4f Updated release notes 20.49.0 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
Roland Reichwein
d5156f9a1a
Fix false positive warning from GCC 16 (#1591) 2026-09-07 14:42:44 +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
53a05760e0 Version updates 2026-09-05 16:15:27 +01:00
John Wellbelove
ae9207dd0a Changed version from 20.50.0 to 20.49.0 2026-09-05 16:15:26 +01:00
Ayesha Noor
dd05595860
Fix MSVC C4244 warning in format specifiers (#1589)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-09-05 12:22:48 +01:00
Roland Reichwein
c8f610a69d
Optimize format.h (#1588)
Dispatch only the argument types which are actually stated. For everything
else, don't generate the code anymore.

Detemplatize parse_format_spec().

Collapse long double and double to double on targets where they are
same size. This helps prevent duplicate code generation.
2026-09-05 09:08:56 +02:00
John Wellbelove
155df46889 Merge branch 'master' into development 2026-09-03 15:16:51 +01:00
John Wellbelove
75c07eca54
Absolute and casting updates (#1583) 2026-09-03 14:38:51 +02:00
Björn Schäpers
a547336322
Set default compare for iconst_map (#1560)
This is consistent with (i)flat_map, and allows to just write iconst_map<K, V>.

Add tests, also fix iconst_set.
2026-09-03 13:27:56 +02:00
Roland Reichwein
e25a44195c
Fix size type of string_view (#1586)
Fixes #1577

Rename variables to align to snake_case convention
2026-09-03 12:36:00 +02:00
John Wellbelove
de83834198
Add Conan Center badge to README 2026-09-02 19:57:19 +01:00
Roland Reichwein
ed5219283b
Detect builtins (#1581)
Even without ETL_USE_TYPE_TRAITS_BUILTINS in the profile, we get
compiler builtins detected. Makes detection more consistent now.

Previously, some type trait builtins were detected automatically,
and some others needed to be activated via ETL_USE_TYPE_TRAITS_BUILTINS
in the profile explicitly.

Replaces: #1174

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-09-02 08:58:40 +01:00