2321 Commits

Author SHA1 Message Date
John Wellbelove
ea397ec2dd Changed non-capturing lambda API to runtime function pointer API 2026-03-31 21:27:44 +02:00
Benedek Kupper
bfbb7259e1 delegate: allow constructing from non-capturing lambdas
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
2026-02-10 22:35:52 +01:00
mike919192
3206ac9feb
ivector swap (#1256)
* Etl vector swap implementation

* Implement swap function overload

* Fix nitpicks

* Add size check

* Remove unnessecary etl swap overloads

* Use swap_range and move range

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-01-11 18:05:21 +01:00
John Wellbelove
6d6ecc9fb5
Add etl::inplace_function (#1251)
* Imported inplace_function and invoke functionality from original branch

* Fixed spelling mistake

* Update test/CMakeLists.txt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/test_inplace_function.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Moved member type function_ptr to private section

* Updated comments in inplace_function.h

* Updated action workflows to be triggered on a pull-request based on development branch

* Added suggested changes from PR reviews

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.co.uk>
2026-01-10 09:46:50 +01:00
John Wellbelove
09555434f6 Fixed multiple definition of 'expected' 2026-01-08 23:05:46 +01:00
Bo Rydberg
f8ee5f450b
Make code base with tests compile under gcc-14 (#1254)
* Make code base with tests compile under gcc-14

* Update buffer_descriptors.h

Following the same style as non-tests headers have. E.g., include/etl/intrusive_list.h & include/etl/intrusive_forward_list.h

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-01-08 22:58:27 +01:00
Iványi Béla
16389b3eea
Indirect vector checks (#1239)
* Check in indirect_vector::emplace_back if the vector is full, when push pop checks are requested

* Add extra checks to indirect_vector

* Fix emplace in indirect_vector not taking const_iterator

* Fix usage of ipool::create<T> in indirect_vector, so that there are no intermitten objects created

---------

Co-authored-by: Béla Iványi <bela.ivanyi@idata.hu>
2026-01-01 09:56:25 +00:00
Nik Delgado
af8ec168c4 implement .begin() and .end() for etl::optional (#1246)
Co-authored-by: nikdelgado <nikdelgado@icloud.com>
2025-12-26 07:25:33 +00:00
John Wellbelove
16b7183eb8 Merge branch 'pull-request/#1245-Fix-discrepancy-with-STL-in-max_element-and-minmax_element' into development 2025-12-23 07:35:26 +00:00
mike919192
342e43e28b
Fix discrepency with STL in max element and minmax element (#1245) 2025-12-23 07:09:37 +00:00
John Wellbelove
96e3229933 Fixed issue with use of binary constants with C++11 in etl::format tests 2025-12-23 07:05:23 +00:00
John Wellbelove
c798bd337b Revert script to full scrolling terminal style 2025-12-23 07:04:31 +00:00
John Wellbelove
922cfde453 Reverted scrolling changes on test script 2025-12-22 21:02:54 +00:00
John Wellbelove
6b3e776eb5 Fixed filters on VS2022 project 2025-12-22 21:02:17 +00:00
John Wellbelove
84f037b616 Enhanced test and syntax check scripts to add non-scrolling command line header 2025-12-22 10:04:17 +00:00
John Wellbelove
d98c3ac903 Fixed issues with unsigned to signed conversion.
Added format.h to VS2022 project.
Added format.h to syntax check CMakeLists.txt
2025-12-22 10:04:16 +00:00
Roland Reichwein
8c90eb8ba8 Add etl::format (#1204)
* Synchronize on C++ 17 for "Windows - STL" and "Windows - No STL"

MSVC C++20 handles char* differently on iteration

* Add etl::format

This adds etl::format, guided by std::format, avoiding dynamic memory
allocation
2025-12-22 10:04:15 +00:00
John Wellbelove
fc951ff9e2 Disabled header include if <C++20 2025-12-22 10:04:14 +00:00
John Wellbelove
a948ffe686 Added concepts.h to VS2022 project.
Added concepts.h to syntax check CMakeLists.txt
2025-12-22 10:04:13 +00:00
Roland Reichwein
e85d29b1dd Added concepts.h and tests (#1213) 2025-12-22 10:04:13 +00:00
John Wellbelove
8d2f91de9f Updated test_invoke 2025-12-22 10:04:12 +00:00
John Wellbelove
1f1e2c54c3 Updated VS2022 project to include invoke.h 2025-12-22 10:04:10 +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
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
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