1694 Commits

Author SHA1 Message Date
John Wellbelove
70ce8efa94 Comments and noexcept updates to placement new 2023-03-31 16:03:03 +01:00
John Wellbelove
967e3da8db Fixed comment spelling 2023-03-28 19:51:47 +01:00
John Wellbelove
6a3ce87d43 Added Tasking compiler 2023-03-28 17:43:32 +01:00
John Wellbelove
a198ba143e Updated versions 2023-03-28 17:43:19 +01:00
John Wellbelove
9a943f4ea3 Fix type traits generator 2023-03-28 17:43:00 +01:00
John Wellbelove
8eabe5fb26 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-03-25 12:16:59 +00:00
John Wellbelove
bb3faea614 Merge branch 'development' into feature/c++14-tests
# Conflicts:
#	.gitignore
#	test/vs2019/etl.vcxproj
2023-03-15 12:49:11 +00:00
John Wellbelove
574e041485 #675 Compilation error in optional.h line 405
Changes for compatibility with C++20

Restore C++17 unit test compatibility
2023-03-15 10:28:55 +00:00
John Wellbelove
542a28a6f3 #675 Compilation error in optional.h line 405 2023-03-10 17:45:39 +00:00
John Wellbelove
0676ded8cf Converted Visual Studio project to VS2022 2023-03-08 14:03:24 +00:00
John Wellbelove
ef4fbdd6c4 Convert the Visual Studio project to VS2022 2023-03-07 20:33:09 +00:00
John Wellbelove
bcad53ebb2 Array bounds and maybe-uninitialized warning fixes
Array bounds and maybe-uninitialized warning fixes

Added GCC/clang diagnostic disable for array bounds

Fixed false positive array bounds failure in unit tests

Added -01 & -03 quick tests

Fixed constexpr for exception constructor

Made virtual functions protected

Updated project files

Updated generated file

Updated versions and release notes
2023-03-02 13:15:42 +00:00
John Wellbelove
7bfa2d9429 Merge branch 'development' into hotfix/#649-intrusive_list-array-bounds-test-failure
# Conflicts:
#	include/etl/intrusive_forward_list.h
#	include/etl/intrusive_list.h
#	include/etl/optional.h
#	test/test_optional.cpp
#	test/vs2019/etl.vcxproj.filters
2023-02-28 19:31:33 +00:00
John Wellbelove
8ddf0935d3 Array bounds and maybe-uninitialized warning fixes 2023-02-28 18:33:49 +00:00
John Wellbelove
4844b54c91 #668 byte_stream changes that add error exceptions have changed previous behaviour 2023-02-22 09:36:53 +00:00
John Wellbelove
2da1accd19 Version updates 2023-02-21 11:52:54 +00:00
John Wellbelove
a89988b8a0 Fix enable_if syntax 2023-02-20 11:39:29 +00:00
John Wellbelove
c5432e42ff Merge branch 'pull-request/#672-Added-HFSM-specific-start()-and-reset()' into development 2023-02-19 13:56:10 +00:00
John Wellbelove
80b397380d Merge branch 'pull-request/#670-span-equality-operators' into development 2023-02-19 12:13:45 +00:00
John Wellbelove
1c01f98518 Merge branch 'feature/add-repair-to-circular_buffer' into development
# Conflicts:
#	include/etl/file_error_numbers.h
2023-02-19 10:46:07 +00:00
John Wellbelove
db9d93d5e2 Added repair() to etl::circular_buffer 2023-02-19 10:45:19 +00:00
John Wellbelove
a21c4bb2f0 Removed unnecessary code in etl::vector_ext::repair() 2023-02-19 10:44:54 +00:00
John Wellbelove
7316c07045 Added etl::contruct_object_at, etl::get_object_at and etl::destroy_object_at 2023-02-19 10:43:43 +00:00
John Wellbelove
2c15062c1b Added etl::is_aligned, etl::alignment_exception and etl::alignment_error 2023-02-19 10:41:43 +00:00
David Ockey
055ce0d442
Added HFSM-specific start() and reset() (#672)
* Added HFSM specific Start and Reset

* Added unit tests for HFSM start() and reset()

* Updated FSM generator
2023-02-16 08:53:17 +00:00
John Wellbelove
eb3593d2ef Added ""_sv string view operators 2023-02-13 11:40:36 +01:00
John Wellbelove
2b96628850 Merge branch 'add-m17-crc' into development
# Conflicts:
#	test/vs2019/etl.vcxproj.filters
2023-02-12 11:46:39 +01:00
John Wellbelove
26caa70981 Added M17 CRC 2023-02-12 11:44:59 +01:00
John Wellbelove
8491133351 Work in progress 2023-02-12 11:26:03 +01:00
John Wellbelove
f93ce1f6c7 Merge branch 'pull-request/#670-span-equality-operators' into development 2023-02-09 18:25:45 +01:00
KurtisT
36a9d70d7c
Feature/span equality operators (#670)
* feat: implement equality operator

* test: test equality operator

* feat: implement not equal operator

* test: test not equal operator

---------

Co-authored-by: Kurtis Thrush <kthrush@jlg.com>
2023-02-09 18:13:14 +01:00
John Wellbelove
24e871cca2 Merge branch 'feature/#615-addition-of-etl--expected' into development 2023-02-09 14:22:48 +01:00
John Wellbelove
a1ce449d83 C++03 compatibility changes 2023-02-09 14:22:14 +01:00
John Wellbelove
4fce31b742 Merge branch 'feature/#615-addition-of-etl--expected' into development 2023-02-08 20:34:21 +01:00
John Wellbelove
d6a5a35910 Fixed etl::result merge issues 2023-02-08 20:27:36 +01:00
John Wellbelove
e3e12ef731 Work in progress 2023-02-08 18:49:41 +01:00
John Wellbelove
1d12a86114 Work in progress 2023-02-08 16:40:15 +01:00
John Wellbelove
31ec6dede5 Merge branch 'hot-fix/#667-etl-span-copy-constructor-with-original-span-create-with-a-fixed-extent-causes-pend-iterator-to-be-invalid' into development 2023-02-07 10:55:41 +01:00
John Wellbelove
a08d7f14dc Fixed span templated copy constructor 2023-02-07 10:55:16 +01:00
John Wellbelove
a710c77d79 Merge branch 'feature/#615-addition-of-etl--expected' of https://github.com/ETLCPP/etl into feature/#615-addition-of-etl--expected
# Conflicts:
#	arduino/library-arduino.json
#	arduino/library-arduino.properties
#	include/etl/expected.h
#	include/etl/private/variant_variadic.h
#	include/etl/result.h
#	include/etl/version.h
#	library.json
#	library.properties
#	support/Release notes.txt
#	version.txt
2023-02-06 20:25:53 +01:00
John Wellbelove
4c92670a6d Work-In-Progress for full implementation of etl::expected
fix set of ETL_NO_STL flag (#628)

Co-authored-by: Sergey Skorokhod <s.skorokhod@1440.space>

Removed duplicate include

unique_ptr updates - Work in progress

Updated versions & memory.h

Fix duplicate function

Fixed incorrect 'valid' flag in assignment operator for arithmetic specialisation

Updated version and release notes

Fix bug #636 in optional emplace for pod types (#638)

Updated version info

Updated generator test script

Only build tests if top level project (#639)

Removed trailing spaces

Updated version info

Incorrect C++03 enable_if syntax

Updated version info

Don't use `push_macro` and `pull_macro` with Tasking compiler (#643)

* Autodetect Tasking compiler

#642

* Don't use `push_macro` and `pop_macro` for Tasking compiler

#642

Co-authored-by: Todd Snider <tsnider@jlg.com>

#643 Don't use push_macro and pull_macro with Tasking compiler

Updated etl::delgate to handle const functors correctly

Updated version info

Fixed functor delegate enable_if

Updated release notes

Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`. (#645)

* Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`.

For some definitions of `ETL_ASSERT()` there may be no return statement in case of an invalid type.
This results in undefined behavior.

Warning[Pe940]: missing return statement at end of non-void function "etl::visit<TReturn,TVisitor,TVariant>(TVisitor &, TVariant const &) include\etl\private\variant_legacy.h 976

* Use more self-explaining code.

Substitute ET_ASSERT() and return by dedicated macro.
This moves the responsibility of how to handle errors to the dedicated place.

improve is_constructible, is_copy_constructible, is_move_constructible for type traits with default definitions (#648)

Removed unused ETL_USE_MEM_BUILTINS option

Updated version info

Updated release notes

Added etl::result<TValue, void> specialisation

Reverted code for etl::result<void, TError> specialisation

Added etl::result<TValue, void> specialisation

Reverted code for etl::result<void, TError> specialisation

Fixed perfect forwarding for make_xxx helper functions

Don't warn on tag missing when subproject (#653) (#655)

Different solution than proposed in the issue, since that proposed
solution would given unexpected results when an intermediate
(untagged) commit is checked out.

This change simply skips warning about a missing git version when this
is a subproject, and uses the original version calculation logic.

I've also renamed `determine_version` to `determine_version_with_file`.
I'd originally done this in an intermediate version of this PR, but I
think that keeping the renaming is clearer code.

Removed superfluous semicolons

Updated version and release notes

Removed testing for 18.04

Added testing for 22.04

Updated Github Actions for Clang

Updated version and release notes

clang updates for Github Actions

Added missing notes

emplace member functions return reference to emplaced value (#659)

emplace_front, emplace_back updates

Updated version and release info

Improved emplace testing

Changed unit test macro CHECK_FALSE_EQUAL to CHECK_NOT_EQUAL

Improved emplace testing

Changed unit test macro CHECK_FALSE_EQUAL to CHECK_NOT_EQUAL

Improved emplace testing

Work-In-Progress

Work-In-Progress

Added indexed emplace

More typedefs for etl::result

Work in progress

Work in progress

Work in progress

Changed default constructor

Added function comments
2023-02-06 20:01:34 +01:00
John Wellbelove
354f2042e6 Work-In-Progress 2023-02-06 19:59:03 +01:00
John Wellbelove
9a13b8c24f Work-In-Progress 2023-02-06 19:54:49 +01:00
John Wellbelove
bdea8c1622 Work-In-Progress 2023-02-06 19:54:32 +01:00
John Wellbelove
f858b36e82 Work-In-Progress 2023-02-06 19:48:51 +01:00
John Wellbelove
580fd757b4 Added destination_router_id parameter overrides to receive() virtuaL functions 2023-01-29 20:55:40 +01:00
John Wellbelove
df6f6d9d96 Added destination_router_id parameter overrides to receive() virtuaL functions 2023-01-29 20:46:41 +01:00
John Wellbelove
f1a9705d88 Work in progress 2023-01-26 19:24:58 +00:00
John Wellbelove
e67811065d Change iterator constructor parameter from reference to pointer
Updated release notes

Update README.md

Added link to documentation

Additional constructors for an initial value
2023-01-26 13:30:22 +00:00
John Wellbelove
f4dd3c3363 Work in progress 2023-01-25 19:51:19 +00:00
John Wellbelove
5fb3e4c2e6 Work-In-Progress for full implementation of etl::expected
fix set of ETL_NO_STL flag (#628)

Co-authored-by: Sergey Skorokhod <s.skorokhod@1440.space>

Removed duplicate include

unique_ptr updates - Work in progress

Updated versions & memory.h

Fix duplicate function

Fixed incorrect 'valid' flag in assignment operator for arithmetic specialisation

Updated version and release notes

Fix bug #636 in optional emplace for pod types (#638)

Updated version info

Updated generator test script

Only build tests if top level project (#639)

Removed trailing spaces

Updated version info

Incorrect C++03 enable_if syntax

Updated version info

Don't use `push_macro` and `pull_macro` with Tasking compiler (#643)

* Autodetect Tasking compiler

#642

* Don't use `push_macro` and `pop_macro` for Tasking compiler

#642

Co-authored-by: Todd Snider <tsnider@jlg.com>

#643 Don't use push_macro and pull_macro with Tasking compiler

Updated etl::delgate to handle const functors correctly

Updated version info

Fixed functor delegate enable_if

Updated release notes

Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`. (#645)

* Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`.

For some definitions of `ETL_ASSERT()` there may be no return statement in case of an invalid type.
This results in undefined behavior.

Warning[Pe940]: missing return statement at end of non-void function "etl::visit<TReturn,TVisitor,TVariant>(TVisitor &, TVariant const &) include\etl\private\variant_legacy.h 976

* Use more self-explaining code.

Substitute ET_ASSERT() and return by dedicated macro.
This moves the responsibility of how to handle errors to the dedicated place.

improve is_constructible, is_copy_constructible, is_move_constructible for type traits with default definitions (#648)

Removed unused ETL_USE_MEM_BUILTINS option

Updated version info

Updated release notes

Added etl::result<TValue, void> specialisation

Reverted code for etl::result<void, TError> specialisation

Added etl::result<TValue, void> specialisation

Reverted code for etl::result<void, TError> specialisation

Fixed perfect forwarding for make_xxx helper functions

Don't warn on tag missing when subproject (#653) (#655)

Different solution than proposed in the issue, since that proposed
solution would given unexpected results when an intermediate
(untagged) commit is checked out.

This change simply skips warning about a missing git version when this
is a subproject, and uses the original version calculation logic.

I've also renamed `determine_version` to `determine_version_with_file`.
I'd originally done this in an intermediate version of this PR, but I
think that keeping the renaming is clearer code.

Removed superfluous semicolons

Updated version and release notes

Removed testing for 18.04

Added testing for 22.04

Updated Github Actions for Clang

Updated version and release notes

clang updates for Github Actions

Added missing notes

emplace member functions return reference to emplaced value (#659)

emplace_front, emplace_back updates

Updated version and release info

Improved emplace testing

Changed unit test macro CHECK_FALSE_EQUAL to CHECK_NOT_EQUAL

Improved emplace testing

Changed unit test macro CHECK_FALSE_EQUAL to CHECK_NOT_EQUAL

Improved emplace testing

Work-In-Progress

Work-In-Progress

Added indexed emplace

More typedefs for etl::result

Work in progress

Work in progress

Work in progress

Changed default constructor

Added function comments
2023-01-21 10:55:15 +00:00
John Wellbelove
f8d5a84161 Change iterator constructor parameter from reference to pointer 2023-01-20 12:13:27 +00:00
John Wellbelove
38c807401e Added emplace by index to variant (variadic)
#660 byte_stream_reader::skip error
2023-01-20 10:53:47 +00:00
John Wellbelove
3beff56587 Fixed byte_stream_reader skip()
Change '<' to '<='
2023-01-19 10:31:39 +00:00
John Wellbelove
e255b34ecd Added emplace by index to variant (variadic) 2023-01-19 09:57:03 +00:00
John Wellbelove
76e2cb1899 Updated version and release info 2023-01-07 15:23:17 +00:00
John Wellbelove
a398207e3d emplace_front, emplace_back updates 2023-01-07 15:20:25 +00:00
Alex Hirsch
a507f8f2a6
emplace member functions return reference to emplaced value (#659) 2023-01-07 12:18:55 +00:00
John Wellbelove
53d3dd7852 Updated version and release notes 2023-01-05 12:48:22 +00:00
John Wellbelove
a414680608 Merge branch 'hotfix/#657-Wpedantic-failure' into development 2023-01-04 10:28:12 +00:00
John Wellbelove
cc2306e1db Removed superfluous semicolons 2023-01-04 10:28:00 +00:00
John Wellbelove
58136cac7b Fixed perfect forwarding for make_xxx helper functions 2022-12-30 18:10:12 +00:00
John Wellbelove
ddf557a0b2 Added etl::result<TValue, void> specialisation
Reverted code for etl::result<void, TError> specialisation
2022-12-28 18:28:10 +00:00
John Wellbelove
a01e974d7d Added etl::result<TValue, void> specialisation
Reverted code for etl::result<void, TError> specialisation
2022-12-28 17:57:09 +00:00
John Wellbelove
16abc0cab4 #649 etl::intrusive_list array bounds test failure 2022-12-28 12:49:42 +00:00
John Wellbelove
3515a94c15 Updated version info 2022-12-22 19:01:57 +00:00
David Hebbeker
280c309885 Avoid 'missing return statement at end of non-void function' in etl::visit<>(). (#645)
* Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`.

For some definitions of `ETL_ASSERT()` there may be no return statement in case of an invalid type.
This results in undefined behavior.

Warning[Pe940]: missing return statement at end of non-void function "etl::visit<TReturn,TVisitor,TVariant>(TVisitor &, TVariant const &) include\etl\private\variant_legacy.h 976

* Use more self-explaining code.

Substitute ET_ASSERT() and return by dedicated macro.
This moves the responsibility of how to handle errors to the dedicated place.
2022-12-22 16:22:05 +00:00
Eyal Abramovitch
688c404d37
improve is_constructible, is_copy_constructible, is_move_constructible for type traits with default definitions (#648) 2022-12-22 16:20:45 +00:00
John Wellbelove
c9565d1fd9 Updated etl::delgate to handle const functors correctly
Updated version info

Fixed functor delegate enable_if
2022-12-17 13:33:30 +00:00
John Wellbelove
8527d6864e #643 Don't use push_macro and pull_macro with Tasking compiler 2022-12-14 11:31:06 +00:00
Todd Snider
22419e3b8b
Don't use push_macro and pull_macro with Tasking compiler (#643)
* Autodetect Tasking compiler

#642

* Don't use `push_macro` and `pop_macro` for Tasking compiler

#642

Co-authored-by: Todd Snider <tsnider@jlg.com>
2022-12-14 00:40:29 +00:00
John Wellbelove
1bf04dcfc6 Updated version info 2022-12-08 12:13:49 +00:00
John Wellbelove
fb10c1d3c7 Incorrect C++03 enable_if syntax 2022-12-08 12:10:57 +00:00
John Wellbelove
72a7273a19 Updated version info 2022-11-25 16:04:02 +00:00
John Wellbelove
d51b0a8427 Updated version info 2022-11-23 12:31:56 +00:00
Chiraffollo
82c2f8a26d
Fix bug #636 in optional emplace for pod types (#638) 2022-11-23 09:25:24 +00:00
John Wellbelove
3623ba5b38 Updated version and release notes 2022-11-16 18:26:22 +01:00
John Wellbelove
54fe9e2554 Fixed incorrect 'valid' flag in assignment operator for arithmetic specialisation 2022-11-16 18:21:46 +01:00
John Wellbelove
22798e1454 Fix duplicate function 2022-11-09 10:42:10 +00:00
John Wellbelove
7184e57a19 Updated versions & memory.h 2022-11-09 09:52:09 +00:00
John Wellbelove
02a3083015 unique_ptr updates - Work in progress 2022-11-07 20:53:10 +00:00
John Wellbelove
3d60bb3c86 Removed duplicate include 2022-11-07 20:52:30 +00:00
John Wellbelove
e9a13b8c9b Work-In-Progress 2022-10-31 17:54:47 +00:00
John Wellbelove
85d40b9dda Remove pointer only etl::to_arithmetic API 2022-10-31 17:04:53 +00:00
John Wellbelove
2d23392ca8 Removed ETL_NODISCARD from constructors 2022-10-29 22:07:01 +01:00
John Wellbelove
76e9ddabfc Updated version and release notes 2022-10-29 22:04:12 +01:00
John Wellbelove
d93c330b76 Finalised etl::to_arithmetic 2022-10-29 21:37:46 +01:00
John Wellbelove
4e4a951f62 Partial change to etl::expected result 2022-10-25 15:45:52 +01:00
John Wellbelove
743d4e32ca Finished floating point conversions and tests 2022-10-24 14:24:28 +01:00
John Wellbelove
1b44133b68 Reordered member initialisation 2022-10-23 19:49:22 +01:00
John Wellbelove
b0266fcc4a Removed constexpr for etl::bit_cast due to unreliability of compiler support 2022-10-23 19:48:49 +01:00
John Wellbelove
5cae6659ba Added float error handling 2022-10-21 15:05:33 +01:00
John Wellbelove
9aea4bf1cc Work-In-Progress 2022-10-20 14:36:44 +01:00
John Wellbelove
d648e27b7f Added has_value() as an alias for is_value()
For consistency with STL
2022-10-20 14:36:28 +01:00
John Wellbelove
890195f3b4 Added ETL_ERROR_WITH_VALUE macro for exceptions that require a value 2022-10-20 14:35:23 +01:00
John Wellbelove
76c7c1a175 Merge branch 'feature/#596-helper-functions-to-convert-strings-to-numeric-values' of https://github.com/ETLCPP/etl into feature/#596-helper-functions-to-convert-strings-to-numeric-values
# Conflicts:
#	include/etl/file_error_numbers.h
#	include/etl/to_arithmetic.h
#	test/vs2019/etl.vcxproj.filters
2022-10-19 19:34:50 +01:00
John Wellbelove
c4aab3397a Tidy up 2022-10-19 19:33:34 +01:00
John Wellbelove
fe497b5945 Work-In-Progress
Integral functions
2022-10-19 19:33:34 +01:00
John Wellbelove
f4357899ed Work-In-Progress
Integral functions
2022-10-19 19:33:20 +01:00
John Wellbelove
17edf62869 Work-In-Progress 2022-10-19 19:33:20 +01:00
John Wellbelove
94117cd56b Work-In-Progress 2022-10-19 19:33:20 +01:00
John Wellbelove
e1aac23b71 Work-In-Progress 2022-10-19 19:33:20 +01:00
John Wellbelove
9da73f474a Work-In-Progress 2022-10-19 19:33:20 +01:00
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
2933fd54d2 Tidy up 2022-10-14 19:17:23 +01:00
John Wellbelove
49e8c3fc4d Work-In-Progress
Integral functions
2022-10-13 19:43:45 +01:00
John Wellbelove
bb7df497ca Work-In-Progress 2022-10-11 06:56:58 +01:00
John Wellbelove
f03143e9b3 Work-In-Progress 2022-10-08 15:22:28 +01:00
John Wellbelove
b48e75b737 Work-In-Progress 2022-10-08 15:00:09 +01:00
John Wellbelove
d9fa85c9a2 Work-In-Progress 2022-10-07 13:39:04 +01:00
John Wellbelove
8cd0546e36 Merge branch 'development' into feature/#596-helper-functions-to-convert-strings-to-numeric-values
# Conflicts:
#	include/etl/file_error_numbers.h
2022-10-07 12:52:58 +01:00
John Wellbelove
de15d0e2fa Changed scaling template parameter 2022-10-06 23:48:53 +01:00
John Wellbelove
a62920adec Remove redundant functions 2022-10-06 14:51:20 +01:00
Chiraffollo
29792fb1f3
fix bug in find_next of (new) bitset class (#618) 2022-10-05 12:20:36 +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
e17348b94d Work-In-Progress 2022-10-03 11:56:57 +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
John Wellbelove
70b475491a Work-In-Progress
Alternate decoding
2022-10-01 11:37:32 +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
9b4bf6b66c Work-In-Progress
Alternate decoding
2022-09-30 11:47:14 +01:00
John Wellbelove
016ebc92d2 Work-In-Progress
Alternate decoding
2022-09-30 11:47:14 +01:00
John Wellbelove
d9686c7824 Experimental algorithm 2022-09-30 11:47:13 +01:00
John Wellbelove
db3af4f14f Work-In-Progress
Function parameter radix implementation
2022-09-30 11:47:13 +01:00
John Wellbelove
5d393f0ef4 Added etl::npos
Added specialisation of etl::optional for POD
2022-09-30 11:47:13 +01:00
John Wellbelove
ade73ed78d Refactored to_arithmetic 2022-09-30 11:47:13 +01:00
John Wellbelove
741a002942 First implementation ideas 2022-09-30 11:47:13 +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
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
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
John Wellbelove
7949c09b93 Merge branches 'development' and 'development' of https://github.com/ETLCPP/etl into development 2022-09-08 20:09:04 +01:00
David Hebbeker
1e592b5921
Do not use min/max workaround for ICCAVR. (#595)
IAR C/C++ Compiler V6.70.1.929 for Atmel AVR does not support push_macro and does neither define macros for min or max.
2022-09-08 16:29:02 +01:00
John Wellbelove
d2e8e0aa71 #594 Use a different workaround for problems with IARCC. 2022-09-07 12:38:30 +01:00
David Hebbeker
63e31068b7
Apply workaround for __has_include(<...>) and ICCAVR. (#593)
ICCAVR: IAR C/C++ Compiler V6.70.1.929 for Atmel AVR

There seems to be an issue with the ICCAVR compiler and `__has_include(<...>)` syntax:

```
Error[Pe008]: missing closing quote etl\include\etl\placement_new.h 48
Tool Internal Error:
Internal Error: [Front end]: assertion failed at: "..\..\Translator\compiler_core\src\parser\edg\literals.c", line 1159
Internal Error: [Front end]: assertion failed at: "..\..\Translator\compiler_core\src\parser\edg\literals.c", line 1159 etl\include\etl\placement_new.h 48
Error while running C/C++ Compiler
```

Which is weird, as I wonder why `__has_include` is defined in first place. The compiler is supposed to support some dialect of C++98.

Anyhow, `__has_include()` seems to work in general with ICCAVR. And with this change the code compiles well.
2022-09-07 11:15:59 +01:00
John Wellbelove
4b0047a3bb Updated release information 2022-09-07 11:13:04 +01:00
John Wellbelove
e8cc472ac9 Finished etl::circular_iterator an circular extensions to etl::span 2022-09-06 19:43:01 +01:00
John Wellbelove
dc0ab72e09 circular_span first draft 2022-09-06 10:59:49 +01:00
John Wellbelove
25adb3c68c Almost finalised circular_iterator and tests 2022-09-04 23:44:51 +01:00
John Wellbelove
2c0f56841e Almost finalised circular_iterator and tests 2022-09-04 21:05:22 +01:00