6025 Commits

Author SHA1 Message Date
Roland Reichwein
d5fc8d0cd1
Add code coverage report (#1357)
* Print test names at test time (#1343)

* Add code coverage report
2026-03-25 20:48:41 +00:00
Roland Reichwein
7fdea7f7ae
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 <jwellbelove@users.noreply.github.com>
2026-03-25 19:28:12 +00:00
Roland Reichwein
e7107b24f1
Fix tests on big endian (#1356)
* Print test names at test time (#1343)

* Fix tests on big endian

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-25 12:47:03 +00:00
Roland Reichwein
66e3d83a81
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 <jwellbelove@users.noreply.github.com>
2026-03-25 12:16:36 +00:00
Roland Reichwein
bd15e42440
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 <jwellbelove@users.noreply.github.com>
2026-03-25 08:14:33 +00:00
Roland Reichwein
0b5621e809
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 <jwellbelove@users.noreply.github.com>
2026-03-25 07:54:18 +00:00
Roland Reichwein
fa3ac74558
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 <jwellbelove@users.noreply.github.com>
2026-03-23 19:51:30 +00:00
William Sciaroni
325908b1b9
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 <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-23 19:30:03 +00:00
Henri Bragge
29ad4b327e
Fix comment in queue::pop (#1347)
* Print test names at test time (#1343)

* Fix comment in queue::pop

---------

Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-17 11:05:28 +00:00
John Wellbelove
3639850b6b Fixed type_traits.h generator 2026-03-13 07:37:02 +00:00
Roland Reichwein
89284de733
Add treefmt support (#1323)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-13 00:11:51 +00:00
Ralph Rooding
ad6e027b08
Add PURL to Zephyr module.yml for SBoM generation (#1344)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-12 20:39:53 +00:00
Roland Reichwein
78d8b82afb Print test names at test time (#1343) 2026-03-12 20:08:22 +00:00
Christoph Rüthing
237d83c107
Add pre C++20 Support for ETL_CONSTINIT using Compiler Extensions (#1335)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-12 19:47:39 +00:00
John Wellbelove
8a61985ac8
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 <jwellbelove@users.noreply.github.com>

* Add missing tests (#1321)

* Add missing tests

* Typo fixes

---------

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

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

- 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<float>, formatter<double>, formatter<long double>

- Floating-point test cases in test_format.cpp

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
# 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 <timon.zijnge@imec.nl>

* 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 <john.wellbelove@etlcpp.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: Niu Zhihong <zhihong@nzhnb.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: Timon Zijnge <47081647+tzijnge@users.noreply.github.com>
Co-authored-by: Timon Zijnge <timon.zijnge@imec.nl>
2026-03-12 17:08:02 +00:00
John Wellbelove
d3affac417
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 <john.wellbelove@etlcpp.com>

* 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 <john.wellbelove@etlcpp.com>

* 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 <jwellbelove@users.noreply.github.com>

* Add missing tests (#1321)

* Add missing tests

* Typo fixes

---------

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

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

- 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<float>, formatter<double>, formatter<long double>

- Floating-point test cases in test_format.cpp

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

* 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 <timon.zijnge@imec.nl>

* 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 <john.wellbelove@etlcpp.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: Niu Zhihong <zhihong@nzhnb.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: Timon Zijnge <47081647+tzijnge@users.noreply.github.com>
Co-authored-by: Timon Zijnge <timon.zijnge@imec.nl>
2026-03-12 17:06:26 +00:00
Roland Reichwein
0a56d40bdd
Fix undefined behaviour of etl::absolute() for etl::numeric_limits<T>::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 <jwellbelove@users.noreply.github.com>
2026-03-12 16:38:10 +00:00
Roland Reichwein
54a1c82c98
Fix run-syntax-checks.sh to be executable (#1342)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-12 15:54:51 +00:00
Roland Reichwein
4a8c167a31
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
2026-03-10 20:39:13 +00:00
Timon Zijnge
521df8ee19
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 <timon.zijnge@imec.nl>
2026-03-07 08:13:00 +00:00
Niu Zhihong
8ce59792fd
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 <cmath>

- 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<float>, formatter<double>, formatter<long double>

- Floating-point test cases in test_format.cpp

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-06 22:04:32 +00:00
Roland Reichwein
67ecc8e11e
Add missing tests (#1321)
* Add missing tests

* Typo fixes

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-06 21:34:54 +00:00
Roland Reichwein
7329efc7df
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 <jwellbelove@users.noreply.github.com>
2026-03-06 20:29:58 +00:00
Roland Reichwein
4ad6126ec5
Fix greater_equal and less_equal (#1331) 2026-03-06 20:08:31 +00:00
John Wellbelove
f96510bd79 Added missing files from VS2022 project 2026-03-06 11:21:38 +00:00
Roland Reichwein
a8ebe338f8
Fix etl::rotate (#1327)
Per the C++ standard, std::rotate returns first + (last - middle):

* When first == middle, return last
* When middle == last, return first
2026-03-06 10:11:46 +00:00
John Wellbelove
7bac1d02f7 Updated release notes and version 20.46.2 2026-03-02 09:16:18 +00:00
John Wellbelove
25c9235cbc
Changed std::is_same to etl::is_same in struct type_list_is_unique (#1320)
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-03-02 09:13:19 +00:00
John Wellbelove
6ed9ca3f1d Updated release notes and version 20.46.1 2026-03-01 13:12:44 +00:00
John Wellbelove
7ee7f10f58
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 <john.wellbelove@etlcpp.com>
2026-03-01 12:27:39 +00:00
John Wellbelove
70e4850a0b Updated version and release notes 20.46.0 2026-02-27 17:43:47 +00:00
John Wellbelove
089f65cce1
Added get_endianness() to etl::byte_stream_reader (#1315)
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-02-27 11:18:29 +00:00
Timon Zijnge
810a106bdf
#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 <timon.zijnge@imec.nl>
2026-02-27 09:40:42 +00:00
John Wellbelove
7ef01fcaed
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 <jwellbelove@users.noreply.github.com>

* Fix etl::as_bytes for etl::span<const T> (#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 <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>

* Fix return value of get_token_list (#1271)

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

* 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 <bflecker@swe.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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<TTypeList>::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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>

* 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 <john.wellbelove@etlcpp.co.uk>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
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 <fleckerbr@gmail.com>
Co-authored-by: Bryton Flecker <bflecker@swe.com>
Co-authored-by: Drew Rife <drew.rife95@gmail.com>
Co-authored-by: Marco Nilsson <marco@zyax.se>

* 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 <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.co.uk>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
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 <fleckerbr@gmail.com>
Co-authored-by: Bryton Flecker <bflecker@swe.com>
Co-authored-by: Drew Rife <drew.rife95@gmail.com>
Co-authored-by: Marco Nilsson <marco@zyax.se>
2026-02-26 10:34:14 +00:00
Roland Reichwein
e439963258
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 <jwellbelove@users.noreply.github.com>
2026-02-25 09:42:56 +00:00
Marco Nilsson
37aba58965
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 <jwellbelove@users.noreply.github.com>
2026-02-25 09:02:02 +00:00
John Wellbelove
7a8944224b
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 <jwellbelove@users.noreply.github.com>

* Fix etl::as_bytes for etl::span<const T> (#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 <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>

* Fix return value of get_token_list (#1271)

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

* 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 <bflecker@swe.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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<TTypeList>::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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>

* 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 <john.wellbelove@etlcpp.co.uk>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
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 <fleckerbr@gmail.com>
Co-authored-by: Bryton Flecker <bflecker@swe.com>
Co-authored-by: Drew Rife <drew.rife95@gmail.com>
Co-authored-by: Marco Nilsson <marco@zyax.se>
2026-02-21 09:36:48 +00:00
John Wellbelove
58b5bf5190 Added tests for make_index_sequence & make_index_sequence_with_offset 2026-02-19 19:35:49 +00:00
John Wellbelove
55da732fc8 Renamed type_list_prepend & type_list_append to type_list_push_front & type_list_push_back respectively 2026-02-19 19:23:36 +00:00
John Wellbelove
1d47e1b731 Fix merge error 2026-02-19 19:05:53 +00:00
John Wellbelove
52e57bc8b6 Merge branch 'development' into feature/Add-more-type_list-features
# Conflicts:
#	include/etl/utility.h
2026-02-19 19:03:41 +00:00
John Wellbelove
56dce4a3aa indentation fix 2026-02-19 18:23:58 +00:00
John Wellbelove
9ebcf41e63 Added type_list_is_empty 2026-02-19 13:29:11 +00:00
Roland Reichwein
992348b4bb
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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
2026-02-19 13:18:12 +00:00
John Wellbelove
226117b972
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 <jwellbelove@users.noreply.github.com>

* Fix etl::as_bytes for etl::span<const T> (#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 <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>

* Fix return value of get_token_list (#1271)

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

* 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 <bflecker@swe.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>

* 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 <john.wellbelove@etlcpp.co.uk>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: Bo Rydberg <2945606+bolry@users.noreply.github.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
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 <fleckerbr@gmail.com>
Co-authored-by: Bryton Flecker <bflecker@swe.com>
2026-02-19 12:41:48 +00:00
John Wellbelove
2ba5e93d01 Added etl::type_list_is_unique 2026-02-19 10:00:57 +00:00
John Wellbelove
25b88e509b Added etl::type_list_all_of, etl::type_list_any_of, and etl::type_list_none_of 2026-02-19 09:16:13 +00:00
John Wellbelove
1b244ec4c0
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 <john.wellbelove@etlcpp.com>
2026-02-18 20:46:21 +00:00
Marco Nilsson
dc0f62cc3f 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 <jwellbelove@users.noreply.github.com>
2026-02-09 11:07:13 +00:00
Roland Reichwein
13c90eb8f2 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 <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
2026-02-09 11:07:13 +00:00