81 Commits

Author SHA1 Message Date
Roland Reichwein
20cab32256
Make ipriority_queue non-sized base class (#1459)
* Fix iterator access algorithm.h

Move from operator[] access to operator+ and operator- to prevent
limited compatibility. This worked before for vector because of
iterators being ptrdiff_t (signed), but not for unsigned access
like size_t as in etl::queue.

* Make ipriority_queue non-sized base class

Fixes issue #1457

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-06-13 11:00:39 +02:00
John Wellbelove
aeb8e4f734 Formatted source files 2026-04-02 14:11:45 +01:00
Daniel Santos
f718c54396
Add bounds and empty checks to container classes (#1334)
* add bounds and empty checks to containers

* address code rabbit review

* correct C++11 constexpr error

* rename new constexpr macro and make it global

* rename queue specializations' exceptions

* change front() implementation in locked queue specializations

* refactor usage of CONSTEXPR and NO_EXCEPT

* expand intrusive queue tests

* introduce lock guards on locked queues

* Print test names at test time (#1343)

* revert mutex and return changes on locking queues

* finish reverting the locked queues

---------

Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-27 10:17:56 +00:00
John Wellbelove
bde8747be8 Add type_list functionality to etl::visitor using etl::visitor_from_type_list 2026-01-28 17:42:25 +00:00
Iványi Béla
0d792ef13b Exception std based option (#1232)
* Add ability to derive etl::exception from std::exception

* Only add test for exception std base when using STL

* Use ETL_NOEXCEPT macro to define a function as noexcept

* Rename macro to keep in line with common style

* Add using_std_exception to etl::traits

---------

Co-authored-by: Béla Iványi <bela.ivanyi@idata.hu>
2025-12-22 10:04:07 +00:00
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
mike919192
3295cb30ca
etl array checks (#1188)
* Regression fix: Support zero arguments emplace() in etl::optional (#1183)

* Added coderabbitai configuration

* Added builtin mem function tests

* Modified etl::typed_storage

* Modified etl::typed_storage

# Conflicts:
#	include/etl/alignment.h

* Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW

* Added etl::typed_storage_ext and swap for same

* Added etl::typed_storage_ext and swap for same

# Conflicts:
#	include/etl/alignment.h

* Added release notes

* Fixes to GCC -O2 errors

* Changed char* parameters to value_type* parameters

* Fixed compilation issues for const containers unit tests

* Added automatic selection of __builtin_memxxx functions for GCC and clang

* Added enhanced coderabbit configuration

* Updated version and release notes

* Disabled constexpr const container tests for C++11

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Updated version and release notes

* feat: removed unreachable break statements (#1169)

* Updated version and release notes

* Modified etl::typed_storage

# Conflicts:
#	include/etl/alignment.h

* Support zero arguments emplace() in etl::optional

For non-fundamental types, a recent change in etl::optional was
introduced that doesn't support zero arguments emplace() anymore.

This change fixes it and adds the respective test.

---------

Co-authored-by: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Co-authored-by: Drew Rife <darife@jlg.com>

* Fix etl::typed_storage by supporting omitted destructors (#1182)

* Added coderabbitai configuration

* Added builtin mem function tests

* Modified etl::typed_storage

* Modified etl::typed_storage

# Conflicts:
#	include/etl/alignment.h

* Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW

* Added etl::typed_storage_ext and swap for same

* Added etl::typed_storage_ext and swap for same

# Conflicts:
#	include/etl/alignment.h

* Added release notes

* Fixes to GCC -O2 errors

* Changed char* parameters to value_type* parameters

* Fixed compilation issues for const containers unit tests

* Added automatic selection of __builtin_memxxx functions for GCC and clang

* Added enhanced coderabbit configuration

* Updated version and release notes

* Disabled constexpr const container tests for C++11

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Updated version and release notes

* feat: removed unreachable break statements (#1169)

* Updated version and release notes

* Modified etl::typed_storage

# Conflicts:
#	include/etl/alignment.h

* Fix etl::typed_storage by supporting omitted destructors

In a recent change to alignment.h, the etl::typed_storage was
changed in a way that in case of an already constructed object,
the object is created via assignment.

However, this contradicts the original use case that led to
etl::typed_storage in the first place:
https://github.com/ETLCPP/etl/pull/1023

The goal is to omit destructors (and at the same time support
classes with deleted assignment operators), so they can be optimized out
at link time.

This change reverts commit ac7b268 to restore the original
functionality and changes the test to reflect the original
use case.

* Fix missing create() in non-C++11 typed_storage_ext constructor

* Typo fix

---------

Co-authored-by: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Co-authored-by: Drew Rife <darife@jlg.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

* removed navis file from project

* Updated version and release notes

* Removed forced unsigned int cast in type_def bit-shift operators (#1178)

* Removed UB in type_def bit-shift operators

* Changed shift operators to allow both signed and unsigned operands for shifts
This allows the library user to explicitly use unsigned values to avoid UB

* Fixed constexpr errors for CPP11

* Changed is_arithmetic checks to use is_integral since valid shifts require integral operands

* Removed need for CPP11 since changes are CPP03 compatible

* Delete project navis files

* Add force CI check on piull requests

* Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or()

Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or()

* Updated version and release notes

* Updated version and release notes

* Remove noexcept from delegate method stubs. (#1185)

In addition to removing noexcept from call_if, this is also needed to prevent
an abort when cancelling a pthread that is executing a delegate.

* Updated version and release notes

* Re architect the extra checks

* Add CHECK_EXTRA

* Fix newline at end of file

* The check index macro also needs to be defined to throw

* Remove ETL_VERBOSE_ERRORS macros

---------

Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Co-authored-by: Drew Rife <darife@jlg.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: David Ockey <2897027+ockeydockey@users.noreply.github.com>
Co-authored-by: Marco Nilsson <marco@zyax.se>
2025-09-23 16:26:19 +01:00
John Wellbelove
5dfdea7115 Removed #define ETL_DEBUG as this is a project define 2025-09-11 19:57:18 +01:00
mike919192
999c210d28
Debug assert (#1175)
* debug assert POC

* Swith to ETL_CONSTEXPR14

* Finish TODO checks

* First and last can be equal

* Add ETL_DEBUG_THROW_EXCEPTIONS

* Try allowing c++11 constexpr

* Add macro for throwing from c++11 constexpr

* Remove braces

* Add extra asserts in size_t overload functions

* Fill out debug asserts

* Line up comments
2025-09-10 10:52:22 +01:00
Roland Reichwein
3c783e2de7
Add etl::closure (#1137) 2025-06-28 11:18:46 +01:00
John Wellbelove
2ff1ed1a12 Removed instances of ETL_NTH_TYPE_FORCE_CPP03_IMPLEMENTATION 2025-06-06 13:53:26 +01:00
John Wellbelove
2085295358 #1119 Forced compiler error in nth_type.h breaks containers for C++03 2025-06-06 12:17:49 +01:00
John Wellbelove
d04ee8c5e7 Added configuration for selection of STL-like or ETL-verbose chrono literals 2025-05-17 11:46:52 +01:00
John Wellbelove
12328670dd Work in progress 2025-05-11 14:11:22 +01:00
John Wellbelove
208d8f9642 Implementation of Base64 encoder and decoder 2024-06-24 17:44:53 +01:00
John Wellbelove
5c2615ac30 Partial refactor into separate encode and decoder headers
Changed to delegate callback based operation
2024-06-14 11:54:23 +01:00
John Wellbelove
a2bd57c89f #806 etl::variant_pool should support C++17 variadic parameters
Added variadic version that supports >=C++11
2024-04-17 16:47:02 +01:00
John Wellbelove
94654689e8 Removed semicolon warnings 2023-08-29 09:25:58 +01:00
John Wellbelove
53084ae932 Added c++03 zero parameter emplace member functions 2023-08-25 02:05:46 +01:00
John Wellbelove
3c6c1ed527 Work in progress 2023-04-02 11:06:42 +01:00
John Wellbelove
db9d93d5e2 Added repair() to etl::circular_buffer 2023-02-19 10:45:19 +00:00
John Wellbelove
baa47d1c33 Updated copyright notice 2022-06-10 21:45:37 +01:00
John Wellbelove
740e490aed Tested ETL traits code. 2022-03-11 20:28:26 +00:00
John Wellbelove
60757a44ab callback and message timers now uses etl::timer_semaphore_t 2022-02-20 18:49:43 +00:00
John Wellbelove
11b4f669d3 Fixed force C++03 implementation flags 2022-02-15 20:58:06 +00:00
John Wellbelove
d0150696a5 Changes for controlling the availability of constexpr algorithms 2022-02-11 09:57:55 +00:00
John Wellbelove
4b1b6004c6 Final(?) changes 2022-01-29 14:16:26 +00:00
John Wellbelove
13b28387c5 Merge branch 'feature/reduce-size-of-state_chart' into development 2022-01-23 14:23:44 +00:00
John Wellbelove
c3b603be32 Fixed IAR warnings in binary.h
Fixe unaligned type_comment
platform.h comments
Fixed etl_profile.h to native little endian for !C++20 or !STL
2022-01-14 10:08:46 +00:00
John Wellbelove
973e0f8ea6 Renamed 8bit check macro 2022-01-10 00:35:02 +00:00
John Wellbelove
e6736404ed Final code after local CI tests 2022-01-08 18:51:35 +00:00
John Wellbelove
a0023aa9aa Updated tests to support C++20 STL 2022-01-08 12:25:18 +00:00
John Wellbelove
fdf3ee164f Disabled C++20 for test 2022-01-03 18:26:48 +00:00
John Wellbelove
d2ba5e9956 Multiple code changes, delegates & timers 2021-12-14 10:52:49 +00:00
John Wellbelove
331e07b272 Multiple code changes, delegates & timers 2021-12-13 17:16:21 +00:00
John Wellbelove
6ff560a416 Merge branch 'feature/variadic-message-router' into development
# Conflicts:
#	.gitignore
#	include/etl/bip_buffer_spsc_atomic.h
#	include/etl/version.h
#	library.json
#	library.properties
#	support/Release notes.txt
#	test/etl_profile.h
#	test/runsanitychecks.sh
#	test/runtests.sh
#	test/vs2019/etl.vcxproj.filters
2021-08-11 15:50:43 +01:00
John Wellbelove
5904687e6d Variadic FSM 2021-08-10 20:25:27 +01:00
John Wellbelove
27f5204032 Added 'Force C++03' macro 2021-08-10 11:31:14 +01:00
John Wellbelove
3044fb24f9 Added configuration for forcing C++03 code 2021-08-10 10:49:32 +01:00
John Wellbelove
98cd1e4fe7 Added configuration for forcing C++03 code 2021-08-05 16:53:33 +01:00
John Wellbelove
e92f93b57f Variadic message_packet 2021-07-31 10:38:21 +01:00
John Wellbelove
fd89f51621 Type traits refactor 2021-07-29 11:34:16 +01:00
John Wellbelove
8f570d81cd Work in progress 2021-07-26 09:29:11 +01:00
John Wellbelove
a7420267a6 Cross compiler compatibity changes 2021-07-18 09:53:13 +01:00
John Wellbelove
aa98a60822 etl::variant release candidate 2021-07-17 23:45:28 +01:00
John Wellbelove
9c68847c5c Compiler compatibility changes 2021-07-15 12:57:46 +01:00
John Wellbelove
de1a19775e Re-enabled all variant unit tests 2021-07-14 12:37:24 +01:00
John Wellbelove
c54bf63a76 Resolved issues with universal references in construction and assignment.
Added 'in_place' structures.
Added etl::overload.
Updated sanity check cmake files.
Added alignment for const void.
2021-07-11 20:36:01 +01:00
John Wellbelove
7e9ca31fb1 Updated overloads 2021-06-29 20:04:18 +01:00
John Wellbelove
2025e6ff9b Latest updates 2021-06-22 14:18:26 +01:00