49 Commits

Author SHA1 Message Date
Roland Reichwein
992348b4bb
Add constexpr to array comparison operators (#1303)
* Remove AppVeyor build status badge

Removed AppVeyor build status badge from README.

* Update README.md

* Update CONTRIBUTING.md

Updated the instructions for contributing.

* Fix for issue 1276 "Data corruption in the etl::bip_buffer_spsc_atomic" (#1277)

* Reproduce data corruption bug in the `etl::bip_buffer_spsc_atomic`.

* Fix data corruption bug in the `etl::bip_buffer_spsc_atomic`.

* Add constexpr to array comparison operators

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: Sergei <sergej.shirokov@gmail.com>
2026-02-19 13:18:12 +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
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
John Wellbelove
c25df24b03 Allow zero sized etl::array 2025-05-18 13:41:01 +01:00
John Wellbelove
ad33083543 Added safe copy to etl::array::assign
etl::array::assign now returns an iterator
2024-01-28 20:35:07 +00:00
John Wellbelove
63d1a64e6c #787 etl::expected doesn't compile with ETL_LOG_ERRORS
Updated CI scripts
#786 u8string
#783 Cannot insert existing value to full set
#781 etl::multi_span::iterator::operator *() fails if first span is empty
#780 endian enum_type produces useless-cast warnings
#779 hash.h: warnings produced with -Wfloat-equal
2023-11-24 09:59:35 +00:00
John Wellbelove
197e0815e6 PR for constexpr for etl::array 2023-07-04 11:45:11 +01:00
John Wellbelove
9f4c5bbb94 C++11 unit tests - Work in progress 2023-04-30 11:06:23 +01:00
John Wellbelove
363a3e2dab Fix test array sizes
C++14 compiler compatibility

Updated test run scripts

Changed some ETL_ASSERT macros to ETL_ASSERT_OR_RETURN

Changed unit test macros for C++20 compaibility

Updated test run scripts

Updated CMake files to allow C++ standard selection

Replaced ETL_ASSERT_AND_RETURN with ETL_ASSERT_OR_RETURN

Updated C++14 & C++20 unit test compatibility

Changed native char8_t check

Added optional optimisation argument to bash script
2023-04-02 11:06:43 +01:00
John Wellbelove
d63be881a4 Fix warnings 2022-09-12 12:21:37 +01:00
John Wellbelove
baa47d1c33 Updated copyright notice 2022-06-10 21:45:37 +01:00
John Wellbelove
90e4316f8f Interim fixes 2022-04-25 10:30:54 +02:00
John Wellbelove
740e490aed Tested ETL traits code. 2022-03-11 20:28:26 +00:00
John Wellbelove
9931339605 Fixes for < GCC 8 2021-11-21 18:31:39 +00:00
John Wellbelove
343dabe7e2 Fixes for < GCC 8 2021-11-21 17:29:56 +00:00
John Wellbelove
94575a1ac1 Fixes for Ubuntu 18 2021-11-21 17:09:16 +00:00
John Wellbelove
8a55da8e21 Array test with movable type 2021-11-10 17:29:06 +00:00
John Wellbelove
201ea97fe6 Latest implementations 2021-11-09 19:46:25 +00:00
John Wellbelove
a3eda2c2e1 Added 'make' functions to construct containers
Added tests for 'make' and 'template deduction'
2021-11-08 19:05:59 +00:00
John Wellbelove
1b7a59be92 Added non-const string pointer overload 2021-11-06 16:45:06 +00:00
John Wellbelove
dd77b4ec70 First experiments 2021-11-04 12:15:14 +01:00
CanastraRF
7c0f169b66
literal with suffix (#416) 2021-08-23 11:01:18 +01:00
John Wellbelove
dbfa71944f Abstracted unit test framework header 2021-03-05 13:52:34 +00:00
John Wellbelove
18d8236f91 Conditionally disable template deduction guide tests 2020-09-29 11:23:10 +01:00
John Wellbelove
911ec65e1b Exclude MSVC compiler due to Appveyor reporting an internal compiler error 2020-09-12 14:45:48 +01:00
John Wellbelove
83f710d636 Try to detect Appveyor 2020-09-12 14:28:36 +01:00
John Wellbelove
14d1b96c64 Added template deduction guides for array and array_view 2020-09-10 13:07:04 +01:00
John Wellbelove
e323f2267f Changed http://www.etlcpp.com to https://www.etlcpp.com 2020-05-01 10:22:36 +01:00
John Wellbelove
caba10699a Move etl::swap to utilities.h
Fixed many CLang warnings
2020-02-24 11:48:04 +01:00
John Wellbelove
9dd88e1885 Merge remote-tracking branch 'origin/development' 2020-02-11 13:27:43 +01:00
John Wellbelove
83347ccfdd Work in progress 2020-01-09 11:15:50 +00:00
John Wellbelove
bd008350a2 Merge remote-tracking branch 'origin/feature/changed_include_paths' into development
# Conflicts:
#	include/etl/version.h
2018-07-28 21:55:27 +01:00
John Wellbelove
a742749849 Merge branch 'development' 2017-11-01 09:33:17 +00:00
John Wellbelove
26b7326d72 Updated Code::Blocks project.
Changed test project include paths to use unittest++ as sub-module.
2017-05-08 20:48:22 +01:00
John Wellbelove
1527e9781f Added assign, insert and erase member functions. 2017-02-16 06:53:36 +00:00
John Wellbelove
f1c5c20ba7 Changed folder structure to be compatible with Arduino library specifications 2016-02-28 14:04:22 +00:00
John Wellbelove
16a1978f43 Added link to www.etlcpp.com in licence header. 2015-12-16 11:09:56 +00:00
jwellbelove
ae385d5561 Added Github link to copyright notice. 2015-02-22 13:23:18 +00:00
jwellbelove
46de221cfe Added self assignment tests. 2015-01-24 19:32:09 +00:00
jwellbelove
824eb89719 Added get() non-member template functions. 2014-12-09 15:04:53 +00:00
jwellbelove
c1d46996d7 Removed spaces 2014-12-08 20:25:30 +00:00
jwellbelove
ca7e569033 Modified array tests 2014-11-19 18:35:37 +00:00
jwellbelove
1108b9e5c7 Updates for Code::Blocks and CodeLite
Updates so that Code::Blocks and CodeLite can compile the tests.
Made include guards upper case.
2014-11-05 17:41:17 +00:00
jwellbelove
740b088282 Changes for compatibility with GCC 2014-11-04 20:33:11 +00:00
jwellbelove
102e4a8bed Changed exception names 2014-11-03 12:33:05 +00:00
jwellbelove
4e2bfb2740 Modified unit tests to use CHECK_THROW 2014-10-31 15:59:22 +00:00
jwellbelove
520b64a243 Lower case 'a' in array.h 2014-10-26 17:41:40 +00:00
jwellbelove
c052dc91be namespace elt to etl
Corrected namespace from elt to etl
2014-10-26 16:39:14 +00:00