1403 Commits

Author SHA1 Message Date
John Wellbelove
dd89aa10fd Work-In-Progress 2022-10-19 19:33:19 +01:00
John Wellbelove
1e53bbbbb8 Work-In-Progress
Alternate decoding
2022-10-19 19:33:19 +01:00
John Wellbelove
626611b43e Work-In-Progress
Alternate decoding
2022-10-19 19:33:19 +01:00
John Wellbelove
552b6360a5 Work-In-Progress
Alternate decoding
2022-10-19 19:33:19 +01:00
John Wellbelove
cee3716d54 Experimental algorithm 2022-10-19 19:33:19 +01:00
John Wellbelove
7e33c6a96b Work-In-Progress
Function parameter radix implementation
2022-10-19 19:33:19 +01:00
John Wellbelove
8f90d117c1 Refactored to_arithmetic 2022-10-19 19:33:19 +01:00
John Wellbelove
e122a62680 First implementation ideas 2022-10-19 19:33:18 +01:00
John Wellbelove
5bf2f1f8e6 Work-In-Progress
Alternate decoding
2022-10-19 19:30:52 +01:00
John Wellbelove
103c443386 Work-In-Progress
Alternate decoding
2022-10-19 19:30:52 +01:00
John Wellbelove
44d83438a9 Experimental algorithm 2022-10-19 19:30:52 +01:00
John Wellbelove
6746c4244f Work-In-Progress
Function parameter radix implementation
2022-10-19 19:30:52 +01:00
John Wellbelove
9b461dea27 Added etl::npos
Added specialisation of etl::optional for POD
2022-10-19 19:30:52 +01:00
John Wellbelove
ee7f9469dc Refactored to_arithmetic 2022-10-19 19:30:52 +01:00
John Wellbelove
3d412e6e7d First implementation ideas 2022-10-19 19:30:51 +01:00
John Wellbelove
ce2a8ba0fc Updated string_view and char traits 2022-10-19 19:14:51 +01:00
John Wellbelove
1d6886ab6e Disable 'unititialized' warning for classes that use uninitialized buffers 2022-10-19 19:12:37 +01:00
John Wellbelove
ae4e1cde3a Fixed merge error 2022-10-19 13:03:58 +01:00
John Wellbelove
c6f892fc66 Changed scaling template parameter 2022-10-19 12:22:52 +01:00
John Wellbelove
b76e9ba553 Remove redundant functions 2022-10-19 12:22:52 +01:00
Chiraffollo
e1099814b9 fix bug in find_next of (new) bitset class (#618) 2022-10-19 12:22:51 +01:00
John Wellbelove
a5c57521cb Fix small issues
Move tests to test_iterator
2022-10-19 12:22:51 +01:00
Eric Vantillard
445f950a82 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-19 12:22:51 +01:00
Jesse Li
1b3d226547 Fix non-usage of key equal function (#606)
Co-authored-by: Jesse <jli@planarmotor.com>
2022-10-19 12:22:51 +01:00
Jesse Li
2beceddfd6 [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-19 12:22:51 +01:00
benedekkupper
9d24c789f8 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-19 12:22:51 +01:00
John Wellbelove
7a1f9f961e Storage type to unsigned char 2022-10-19 12:20:43 +01:00
John Wellbelove
8382606b7b char to unsigned char storage 2022-10-19 12:20:43 +01:00
John Wellbelove
edb6c87a2d Added select1st and select2nd 2022-10-19 12:20:42 +01:00
Eric Vantillard
b5182dd83e 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-19 12:20:42 +01:00
Ross Younger
92d8739db4 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-19 12:20:42 +01:00
John Wellbelove
daa42f2d4b Endianness for IAR compiler 2022-10-19 12:20:42 +01:00
David Hebbeker
804a401a6e 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-10-19 12:20:42 +01:00
David Hebbeker
a4a096a54d 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-10-19 12:20:42 +01:00
David Hebbeker
aa2d249fdc 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-10-19 12:20:42 +01:00
jeremyerdmann
93d9df9c9b
Automatically set ETL_HAS_ATOMIC if __STDC_NO_ATOMICS__ defined by compiler. (#624)
Reference: https://en.cppreference.com/w/c/atomic

Co-authored-by: Jeremy Erdmann <jeremy.erdmann@millerwelds.com>
2022-10-18 18:30:48 +01:00
John Wellbelove
e99a1a5845 Attempt to fix clang CI error 2022-09-11 19:50:09 +01:00
John Wellbelove
f8d9eb0f46 Attempt to fix clang CI error 2022-09-11 18:02:27 +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
bc48b8ac4e Deleted copy constructors for etl::circular_buffer_ext, etl_indirect_vector and etl::vector to eliminate dangling pointers. 2022-09-11 12:04:28 +01:00
John Wellbelove
f952057508 Added ETL_ENUM_CLASS and ETL_ENUM_CLASS_TYPE macros 2022-09-11 00:59:34 +01:00
John Wellbelove
c953100dd0 Improved etl::span/std::span compatibility 2022-09-11 00:58:22 +01:00
John Wellbelove
7b733f73ad Minor updates to bitset
Added bitset_ext tests to cmake
2022-09-11 00:57:00 +01:00
John Wellbelove
e78e7b474a Added etl:lsb_mask, etl::make_lsb_mask, etl::msb_mask and etl::make_msb_mask 2022-09-11 00:55:55 +01:00
John Wellbelove
1e7b5887f5 Minor changes 2022-09-09 19:06:23 +01:00
John Wellbelove
435cec705f Modified order of standard includes 2022-09-09 14:20:24 +01:00
John Wellbelove
737b0bf6f7 #591 Automatically define __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS 2022-09-08 23:00:48 +01:00
John Wellbelove
2d0d744c74 Updated etl::bitset and added etl::bitset_ext 2022-09-08 20:11:20 +01:00