* 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>
* 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>
* 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
* 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>
* 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>
* 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
* 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
* 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>
* 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
* 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
* 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>
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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>
* 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>
* Make all call interfaces in etl::delegate conditionally noexcept
This covers the case when the invoked code can throw.
For operator(), this was already implemented. Do similarly for the
other call interfaces.
* Make all call interfaces in etl::closure conditionally noexcept
Similar to etl::delegate, the contained delegate might be
throwing. Apply the same solution as in etl::delegate to make
the call interfaces conditionally noexcept.
* Refactored callback_timer_locked to allow base class extention of tick method
* Implement callback timer deferred with priority option
---------
Co-authored-by: Mario Luzeiro <mluzeiro@gliderbits.com>
* Reproduce bug in the `void etl::unlink(first, last)` for bidirectional links.
- correct `test_unlink_range_bidirectional_link` unit test according to the documentation - now this test fails.
- enhance `test_intrusive_list::test_splice_range_self` unit test to verify also `etl_previous` links after splicing lists - now unit test crashes.
* Fix bug in the `void etl::unlink(first, last)` for bidirectional links.
- `test_unlink_range_bidirectional_link` unit test now is green.
- `test_intrusive_list::test_splice_range_self` is not crashing anymore and green.