2297 Commits

Author SHA1 Message Date
John Wellbelove
534726fe20 Updated test_invoke 2025-12-20 10:19:24 +00:00
John Wellbelove
c8dc46ec9b Updated VS2022 project to include invoke.h 2025-12-19 08:27:06 +00:00
John Wellbelove
0f9f6d826a Formatting updates 2025-12-18 16:11:35 +00:00
whitfijs-jw
1fe725769c Topic/expected monadic operations (#1219)
* topic/expected-monadic-operations:
	- added and_then, or_else, transform, and transform_error with simple tests

* topic/expected-monadic-operation:
	- added void TValue specialization operations
	- updated unit tests to include expected<void, TError>
	- added is_expected to expected.h, used in and_then to ensure that the returned type is an expected

* topic/expected-monadic-operations:
	- made implementation c++11 compatible

* topic/expected-monadic-operations:
	- started addressing coderabbit feedback

* topic/expected-monadic-operations:
	- adapted invoke to etl
	- reworked return type deduction
	- filled in or_else unit tests to be more complete
	- still need to add invoke unit tests

* topic/expected-monadic-operations:
	-c++14 compliance

* topic/expected-monadic-operations:
	- completed coderabbit suggestions

* topic/expected-monadic-operations:
	- formatting in invoke and expected
	- added test suite for invoke

* topic/expected-monadic-operations:
	- fixed missing moves for const TValue&& and const TError&&

* topic/expected-monadic-operations:
	- made everything c++11 compatible, very verbose as a result

* topic/expected-monadic-operations:
	- fixed code rabbit rewivew for move semantics in const && overloads

* topic/expected-monadic-operations:
	- moved around a move

* topic/expected-monadic-operations:
	- added etl:: to invoke_result calls that were missing it

* topic/expected-monadic-operations:
	- formatting

* topic/expected-monadic-operations:
	- added invoke for void f() calls for consistency

* topic/expected-monadic-operations:
	- reworked entire thing to be able to handle expected<T,E> to expected<void,E> without even more code duplication

* topic/expected-monadic-operations:
	- added trailing return type to maintain c++11 compatibility

* topic/expected-monadic-operations:
	- fixed mismatch between deduced type and return for a few functions

* topic/expected-monadic-operations:
	- replaced calls to get<TError> and get<TValue> with get<Error_Type> and get<Value_Type>

---------

Co-authored-by: Jon Whitfield <jon@volumetrix.com>
2025-12-18 10:34:51 +00:00
John Wellbelove
6f11b19cfa Remove legacy VS2019 project 2025-12-17 09:55:35 +00:00
John Wellbelove
cb2b3fe6f4 Added --pedandic-errors and -Werror to CMakeLists.txt 2025-12-16 10:41:53 +00:00
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
John Wellbelove
558c04b0a0 Added <type_traits> for C++23 clang 2025-12-10 18:35:45 +00:00
John Wellbelove
0744ee6989 Added type_traits to test_memory 2025-12-10 08:22:45 +00:00
John Wellbelove
6ebd24578b Don't test deprecated has_denorm in C++23 and above 2025-12-09 10:10:49 +00:00
John Wellbelove
9eb17369c4 Don't test deprecated has_denorm in C++23 and above 2025-12-09 09:47:00 +00:00
John Wellbelove
338d0a4cf5 Don't test deprecated has_denorm in C++23 and above 2025-12-09 09:34:07 +00:00
John Wellbelove
1039327148 Minor comment and project file change 2025-12-09 08:57:23 +00:00
John Wellbelove
31b658ba81 Improve implementation of traits for functions 2025-12-08 09:11:25 +00:00
mike919192
3525c63b54
Bugfix: Issue 1212 span constructor (#1231)
* Quick fix for issue 1212

* #if macro around std array uses

* Fix macro placement

* Maybe size_t

* Maybe SIZE_

* Check if old boost style works

* Fix angle brackets

* Cleanup traits and add const constructors

* Add traits to C++03 constructors
2025-12-08 09:07:29 +00:00
John Wellbelove
34abed35b0 Synchronised generators with source files 2025-12-02 17:13:10 +00:00
mike919192
cb25fdfff5 Bugfix: Fixed span reinterpret_as should return fixed span (#1210)
* Fixed span reinterpret should also return fixed span

* Use auto instead of CTAD
2025-11-29 09:54:35 +00:00
David Ockey
79afa52c1e
Catch reentrant calls to FSM and HFSM start, receive, etc. (#1202)
* Added mechanism to catch reentrant calls to methods that could change states in FSM/HFSM

* Added missing include for HFSM unit tests

* Fixed error text spacing

* Disabled move/copy semantics for reentrancy guard

* Updated FSM generator

* Made move semantics only available for C++11 and higher

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2025-11-29 09:54:17 +00:00
Iványi Béla
79b41c85af
Fix is_truncated in basic_string (#1223)
Co-authored-by: Iványi Béla <bela.ivanyi@idata.hu>
2025-11-29 09:38:10 +00:00
mike919192
a6f4c0b4d1
Basic string checks (#1222)
* Add checks for index, front, back, and insert

* Add erase checks

* Add tests to string_char

* Add u16 tests

* Add tests to string u32

* Add u8 tests

* Add wchar tests

* Use size() for back functions.  Fix some uses of buffer2

* Add assert for swapped insert iterators.  Add tests
2025-11-27 08:52:37 +00:00
Roland Reichwein
14e3b9d11e
Cleanup platform.h includes, add missing test for unaligned_type (#1218)
* platform.h include cleanup

* Add test for implicit value conversion in unaligned_type
2025-11-27 08:50:39 +00:00
Helder Duarte
78f04ad298
Fix value_or not taking const in optional (#1225) 2025-11-27 08:48:27 +00:00
Roland Reichwein
2f535d385f
Add test for swap (#1221) 2025-11-12 18:05:20 +00:00
Filipe Cuim
43d3f0e89c
Add const specialization for etl::get_object_at (#1217)
Signed-off-by: Filipe Cuim <filipemocuim@gmail.com>
2025-11-11 19:12:39 +00:00
John Wellbelove
4b8ab3eeda Added type_list_has_duplicates_of and type_list_count_of 2025-10-13 23:02:45 +01:00
John Wellbelove
02b0de1ae9 Added extra static assert checks for functors and lambdas 2025-10-13 17:42:27 +01:00
John Wellbelove
e0e7155d63 Merge branch 'pull-request/#1188-etl-array-checks' into development 2025-10-13 17:37:56 +01:00
mike919192
4147216231
etl::span checks (#1201)
* Implement checks

* handle cpp11 constexpr exceptions

* Cant use local variables

* Tests should be implemented

* Try to fix msvc

* Fix etl error text
2025-10-13 17:34:34 +01:00
John Wellbelove
3f7b18e3c2 Changed result of etl::is_constant_evaluated() in test_is_constant_evaluated from const to constexpr. 2025-10-11 11:41:02 +01:00
John Wellbelove
85678586c4 Merge branch 'pull-request/#1199-Added-support-for-transitions-on-state-enter-for-HFSM' into development 2025-10-11 11:01:53 +01:00
John Wellbelove
07894526e0 Added test_hfsm_recurse_to_inner_state_on_start.cpp to project 2025-10-11 11:01:35 +01:00
John Wellbelove
047071211c Merge branch 'pull-request/#1012-Implement-Signal' into development
# Conflicts:
#	test/vs2022/etl.vcxproj.filters
2025-10-11 10:51:19 +01:00
John Wellbelove
11c509bb44 Merge branch 'pull-request/#1196-Added-back-in-support-for-populating-non-8-bit-strings-with-8-bit-data' into development 2025-10-11 10:47:46 +01:00
John Wellbelove
6ab05a5d7e Rebased on development 2025-10-08 10:26:28 +01:00
mike919192
99a33535d3 Vector checks (#1193)
* Add checks to vector and fix test failures

* Add tests to vector

* Add tests to external buffer and non trivial

* All tests should be implemented

* Add checks to vector_pointer and vector_pointer_ext

* Get bad iterators from a second vector
2025-10-08 10:25:42 +01:00
John Wellbelove
a25f195637 Renamed ETL_ASSERT_UNTYPED to ETL_ASSERT_GENERIC 2025-10-08 10:25:41 +01:00
John Wellbelove
9c3e786509 Added missing CI scripts to the project 2025-10-08 10:25:18 +01:00
John Wellbelove
a2415cc30f Removed #define ETL_DEBUG as this is a project define 2025-10-08 10:25:00 +01:00
mike919192
f2c33a4466 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-10-08 10:24:59 +01:00
John Wellbelove
8dff499500 Added insert/remove tests 2025-10-08 10:23:32 +01:00
John Wellbelove
21d7ebe879 Added insert and remove timer callback tests to test_message_timer_interrupt and test_message_timer_locked 2025-10-08 10:23:30 +01:00
Mario Luzeiro
793bafa1b4 Added callbacks when a timer is inserted or removed (#1155) 2025-10-08 10:23:30 +01:00
mike919192
c13d01319e 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-10-08 10:22:54 +01:00
John Wellbelove
da32625f10 Removed #define ETL_DEBUG as this is a project define 2025-10-08 10:22:14 +01:00
mike919192
5b76824c61 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-10-08 10:21:14 +01:00
David Ockey
f9982a6fde
Added back in support for populating non 8-bit strings with 8-bit data (#1196)
* Fixed ability to populate 16-bit strings with 8-bit data

* Added more unit tests

* Fixed C++11 build errors

* Changed testing to accommodate C++11 better

* Cleaned up comments

* Cleaned up tests to be more consistent

* Make template matches mutually exclusive to prevent ambiguous behavior

* Added changes to u32 and wchar strings

* Changed const range tests to use const string
2025-10-08 09:39:26 +01:00
Roland Reichwein
05731c2786
Add etl::is_constant_evaluated (#1198)
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2025-10-08 09:32:43 +01:00
David Ockey
86b9e0903f
Added support for transitions on state enter for HFSM (#1199)
* Added support for transitions on state enter for HFSM

* Fixed unit test build error

* Comment clean-up

* Changed FSM so that self-transitions can also transition "on enter"

* Fixing C++03 build error for clang
2025-10-08 08:43:09 +01:00
mike919192
2bf512dd42 Vector checks (#1193)
* Add checks to vector and fix test failures

* Add tests to vector

* Add tests to external buffer and non trivial

* All tests should be implemented

* Add checks to vector_pointer and vector_pointer_ext

* Get bad iterators from a second vector
2025-10-03 10:49:23 +01:00
John Wellbelove
bcf7a95bb6 Renamed ETL_ASSERT_UNTYPED to ETL_ASSERT_GENERIC 2025-10-02 08:28:50 +01:00