5857 Commits

Author SHA1 Message Date
John Wellbelove
702dda4373 Synchronised etl::invoke_result with that in the etl::inplace_function branch 2025-12-22 10:04:11 +00:00
John Wellbelove
1f1e2c54c3 Updated VS2022 project to include invoke.h 2025-12-22 10:04:10 +00:00
John Wellbelove
054fca0e25 Updated functional.h from the code in the inplace_function branch 2025-12-22 10:04:10 +00:00
John Wellbelove
1ac82dc83e Updated invoke.h from the code in the inplace_function branch 2025-12-22 10:04:09 +00:00
John Wellbelove
552e0f8b90 Formatting updates 2025-12-22 10:04:09 +00:00
whitfijs-jw
269f3ffdfd 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-22 10:04:08 +00:00
John Wellbelove
520b4a9f46 Removed redundant semicolon from TEST_SUITE block 2025-12-22 10:04:07 +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
Roland Reichwein
3c36e696f5 Bugfixes for compile errors in optimized tests (#1235)
* Fix optimized tests by suppressing warning from STL

* Fix uninitialized buffer in hash for month_weekday

* Fix overlapping memcpy with memmove

* Fix random out of bounds index in __builtin_memmove

Suppressing compiler warning

* Fix array bounds warnings from static casts in message_router

In compiled code, casting to wrong message types is generated,
even though the code paths are supposed to be never taken due to runtime
msg id checks. Therefore, the warnings can be suppressed.

* Fix syntax errors in base64 decoder tests

* Fix test failure in test_rounded_integral_division.cpp when optimized

When building tests optimized, test_round_to_half_even_signed_limits
fails due to the fact that

etl::absolute(std::numeric_limits<int32_t>::min()) < 0
2025-12-22 10:04:06 +00:00
John Wellbelove
8918cab50a Merge branch 'pull-request/#1238-Various-cleanup' of https://github.com/ETLCPP/etl into pull-request/#1238-Various-cleanup 2025-12-20 10:42:55 +00:00
Roland Reichwein
33f7bbc43d Various cleanup (#1238)
* Fix typo for remainder in rounded_integral_division.h

* Use etl::make_unsigned instead of std::make_unsigned

* Fix divide_round_half_down and divide_round_half_odd
2025-12-20 10:42:47 +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
Roland Reichwein
8f3db74be8
Various cleanup (#1238)
* Fix typo for remainder in rounded_integral_division.h

* Use etl::make_unsigned instead of std::make_unsigned

* Fix divide_round_half_down and divide_round_half_odd
2025-12-13 07:46:14 +00:00
John Wellbelove
558c04b0a0 Added <type_traits> for C++23 clang 20.44.2 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
868eaa2b79 Changed Github CI to use macos-15 2025-12-09 09:11:07 +00:00
John Wellbelove
133d065bf1 Updated release notes 2025-12-09 08:58: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
John Wellbelove
57c50fce89 Updated misleading template parameter names 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
743ed78223 Merge branch 'development' 2025-12-04 08:25:39 +00:00
John Wellbelove
1128414d21 Synced type_traits generator 2025-12-04 08:15:24 +00:00
John Wellbelove
1f15e86ebf Updated version and release notes 2025-12-04 08:11:50 +00:00
John Wellbelove
f5f76165ef Replaced locally defined logical_not_t with etl::negation 2025-12-04 08:11:11 +00:00
John Wellbelove
7fd0360664 Replaced locally defined logical_not_t with etl::negation 2025-12-04 07:47:39 +00:00
John Wellbelove
3c64940e90 Fixed C++03 compatibility
Updated type_traits generator
2025-12-03 09:07:27 +00:00
John Wellbelove
34abed35b0 Synchronised generators with source files 2025-12-02 17:13:10 +00:00
raitraak-rrk
ea73cde70b
variant_legacy.h: Rename template parameters (#1229)
* Bugfix: Fixed span reinterpret_as should return fixed span (#1210)

* Fixed span reinterpret should also return fixed span

* Use auto instead of CTAD

* variant_legacy.h: Rename template parameters

* Allows compatibility with legacy libraries defining U8 similar to uint8_t (e.g. Segger).

---------

Co-authored-by: mike919192 <91038685+mike919192@users.noreply.github.com>
2025-12-02 10:34:06 +00:00
John Wellbelove
ee820f0742 #1228u nused parameter 'secure'
Also fixed for 'truncated'
2025-11-29 09:54:36 +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
mike919192
81a643b9b5
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:41:54 +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
Roland Reichwein
efd5c57419
Change generators to reflect changes in fsm.h and type_traits.h (#1211)
Previous changes were wrongfully made in fsm.h and type_traits.h
instead of in their generator counterparts.

Add CI check to ensure generated files are in sync.
2025-11-27 08:54:13 +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
lschneidercor
e5dd953c8b
Add missing include to optional (#1226)
When the initializer list is not included, the default std::initializer
list is used and ETL_NO_STL would be ignored.
2025-11-27 08:47:50 +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
b6e78b7c9c Updated etl::array and etl::delegate
Updated release nots and version
20.44.1
2025-10-19 18:40:58 +01:00
mike919192
bb24ea2164
Fix array noexcept expr (#1208) 2025-10-19 17:10:32 +01:00
John Wellbelove
a025d0cc68 Update version and release notes 20.44.0 2025-10-15 08:33:38 +01:00
John Wellbelove
817f2ab99e Update version and release notes 2025-10-14 18:03:14 +01:00