3918 Commits

Author SHA1 Message Date
John Wellbelove
34f818d649 Merge branch 'feature/#616-Provide-cmake-library-for-UnitTest++' into development 2022-10-06 10:47:54 +01:00
Chiraffollo
29792fb1f3
fix bug in find_next of (new) bitset class (#618) 2022-10-05 12:20:36 +01:00
Joris Putcuyps
c8fb2b4a43
Provide cmake library for UnitTest++. (#616)
* Provide cmake library for UnitTest++.
Prefer cmake target_* commands.

* Replace wrong cmake link options with compile

* We need the sanitize flags also in linker
2022-10-04 22:31:07 +01:00
John Wellbelove
ed91987454 Fix small issues
Move tests to test_iterator
2022-10-04 18:42:14 +01:00
Eric Vantillard
af98e175e2
Feature/add back insert iterator (#603)
* Add back_inserter implementation

- Mainly a copy of the STL implementation found in LLVM.
- Add test_back_insert_iterator unit test.

* Add documentation and use ETL_OR_STD macro

* Add MIT License in header

* Move back_insert_iterator into iterator.h

* Remove unused code

* Strictly follow the C++ STL naming

https://en.cppreference.com/w/cpp/iterator/back_insert_iterator
Strictly following the C++ STL would have container_ be container.

* Make the check for C++11 clearer

* Run the unit test only for C++11

* Add front_insert_iterator

- Make back_insert_iterator available to C++03
- Add ETL_CONSTEXPR17,ETL_NODISCARD and ETL_USING_CPP11
- Replace std:move usage by etl::move
- Update doc

* Use explicit namespace for adressof() and move().
2022-10-04 12:03:15 +01:00
John Wellbelove
eef3605297 Merge branch 'hotfix/#606-fix-non-usages-of-key-equal-function' into development 2022-10-04 11:58:23 +01:00
Jesse Li
52b7187324
[bug] Special case check for hashing -0.0 (#605)
* Special case check for hashing 0 floating point numbers

* Update test_hash.cpp

Co-authored-by: Jesse <jli@planarmotor.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2022-10-03 19:17:00 +01:00
Jesse Li
5dee901894
Fix non-usage of key equal function (#606)
Co-authored-by: Jesse <jli@planarmotor.com>
2022-10-03 19:08:08 +01:00
John Wellbelove
5faf7b0dc1 Merge branch 'hotfix/#614-unaligned-types-match-the-signedness-of-the-storage-type-with-the-template-type' into development 2022-10-03 19:05:13 +01:00
John Wellbelove
a63408e66a Merge branch 'hotfix/#614-unaligned-types-match-the-signedness-of-the-storage-type-with-the-template-type' of https://github.com/ETLCPP/etl into hotfix/#614-unaligned-types-match-the-signedness-of-the-storage-type-with-the-template-type
# Conflicts:
#	include/etl/unaligned_type.h
2022-10-03 16:52:36 +01:00
John Wellbelove
644c950016 Storage type to unsigned char 2022-10-03 16:46:05 +01:00
benedekkupper
34cbc538fc
unaligned types: use unsigned storage type (#614)
This saves one static_cast when copying from storage to value,
and prevents unintended sign-extension when extracting raw data.
2022-10-03 16:43:23 +01:00
John Wellbelove
2f31267ea2 char to unsigned char storage 2022-10-03 01:00:51 +01:00
John Wellbelove
9c04431bea Merge branch 'feature/#610-add-pair-functors' into development 2022-10-02 13:01:11 +01:00
John Wellbelove
74b3cad1a4 Merge branch 'development' of https://github.com/ETLCPP/etl into development 2022-10-02 12:56:35 +01:00
John Wellbelove
7dd3e3bcbb Added select1st and select2nd 2022-10-02 12:55:55 +01:00
Eric Vantillard
8b52ad62dd
Feature/add pair functors (#610)
* Move __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before `#include <stdint.h>`. (#601)

Macros must be defined before first include of stdint.h. Else they have no effect.

* Replace ETL_COMPILER_ICCAVR by ETL_COMPILER_IAR. (#602)

The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered.

Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection).

At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.

* Fix 'maybe-uninitialized' g++ error on macos (#600)

* Add documentation to the pair class

* Add test directory to the EXAMPLE_PATH

* Update .gitignore

- Remove duplicate entries
- Add doxygen output directories

* Add Select1st and Select2nd functors

* Merge select1st and select2nd into utility.h

Co-authored-by: David Hebbeker <dhebbeker@users.noreply.github.com>
2022-10-01 11:40:18 +01:00
Ross Younger
7bf7a4d744
Fix bare assert in reference_counted_object.h (#613)
Signed-off-by: Ross Younger <crazyscot@gmail.com>

Signed-off-by: Ross Younger <crazyscot@gmail.com>
2022-10-01 11:30:37 +01:00
John Wellbelove
c8471e5eeb Endianness for IAR compiler 2022-09-30 11:46:13 +01:00
David Hebbeker
d1e094476e
Automatically detect native endianness for IAR compiler platform. (#612)
* Auto detect native endianness for IAR compiler platform.

References:

- [IAR C/C++ Development Guide Compiling and Linking for Arm Limited’s **Arm**® Cores](https://wwwfiles.iar.com/arm/webic/doc/ewarm_developmentguide.enu.pdf)
- [IAR C/C++ Compiler User Guide for Microchip Technology’s **AVR** Microcontroller Family](https://wwwfiles.iar.com/AVR/webic/doc/EWAVR_CompilerGuide.pdf)

* Fix spelling mistake.
2022-09-29 08:20:54 +01:00
Eric Vantillard
181a438287
Fix 'maybe-uninitialized' g++ error on macos (#600) 2022-09-14 12:56:45 +01:00
David Hebbeker
24ebe3efe8
Replace ETL_COMPILER_ICCAVR by ETL_COMPILER_IAR. (#602)
The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered.

Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection).

At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.
2022-09-14 11:29:37 +01:00
David Hebbeker
d31f787585
Move __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before #include <stdint.h>. (#601)
Macros must be defined before first include of stdint.h. Else they have no effect.
2022-09-14 11:12:47 +01:00
Robin Mueller
796752172c
remove empty text file (#598) 2022-09-12 13:29:38 +01:00
John Wellbelove
d63be881a4 Fix warnings 20.34.0 2022-09-12 12:21:37 +01:00
John Wellbelove
7393090b94 Merge branch 'master' into development 2022-09-12 00:48:20 +01:00
John Wellbelove
6518af01c6 Attempt to fix clang CI error 2022-09-12 00:40:19 +01:00
John Wellbelove
de22577140 Attempt to fix clang CI error 2022-09-12 00:40:19 +01:00
John Wellbelove
34491c4ccb Attempt to fix clang CI error 2022-09-12 00:38:45 +01:00
John Wellbelove
eb3c6b7c58 Attempt to fix clang CI error 2022-09-12 00:23:28 +01:00
John Wellbelove
c39ed5af80 Attempt to fix clang CI error 2022-09-12 00:00:06 +01:00
John Wellbelove
cc17c93ef2 Attempt to fix clang CI error 2022-09-11 23:48:02 +01:00
John Wellbelove
31edd14a8c Attempt to fix clang CI error 2022-09-11 23:31:17 +01:00
John Wellbelove
b4e4bcc6b3 Attempt to fix clang CI error 2022-09-11 22:50:01 +01:00
John Wellbelove
d7609360e8 Attempt to fix clang CI error 2022-09-11 21:11:27 +01:00
John Wellbelove
89d17dd773 Attempt to fix clang CI error 2022-09-11 20:50:56 +01:00
John Wellbelove
d62f2bc666 Attempt to fix clang CI error 2022-09-11 20:32:09 +01:00
John Wellbelove
8d99194528 Attempt to fix clang CI error 2022-09-11 20:10:26 +01:00
John Wellbelove
e99a1a5845 Attempt to fix clang CI error 2022-09-11 19:50:09 +01:00
John Wellbelove
11c520fbaf Attempt to fix clang CI error 2022-09-11 19:20:11 +01:00
John Wellbelove
93aa08682c Attempt to fix clang CI error 2022-09-11 18:34:06 +01:00
John Wellbelove
f8d9eb0f46 Attempt to fix clang CI error 2022-09-11 18:02:27 +01:00
John Wellbelove
471c86828b Attempt to fix clang CI error 2022-09-11 17:09:29 +01:00
John Wellbelove
4645b7bf23 Attempt to fix clang CI error 2022-09-11 16:28:12 +01:00
John Wellbelove
0bfe4baa63 Attempt to fix clang CI error 2022-09-11 16:04:15 +01:00
John Wellbelove
23be4cfd02 Attempt to fix clang CI error 2022-09-11 15:41:51 +01:00
John Wellbelove
38458a71e3 Attempt to fix clang CI error 2022-09-11 15:29:51 +01:00
John Wellbelove
ceeee5686d Attempt to fix clang CI error 2022-09-11 15:00:22 +01:00
John Wellbelove
a7b11834f7 Fixed missing include 2022-09-11 13:32:04 +01:00
John Wellbelove
ff41f70dd0 Updated release notes 2022-09-11 13:14:31 +01:00