1356 Commits

Author SHA1 Message Date
John Wellbelove
68d5f39c7c Merge branch 'master' into feature/constexpr-for-string_view 2022-01-25 10:49:56 +00:00
John Wellbelove
734e4e654a Minor changes
Modified MSVC compiler C++11 check
2022-01-24 20:15:17 +00:00
John Wellbelove
3b7f280b32 Reinstated get_state_id() and start() functions in he base class. 2022-01-24 17:36:47 +00:00
John Wellbelove
64b6c20d19 Merge branch 'master' into feature/constexpr-for-string_view
# Conflicts:
#	include/etl/iterator.h
#	include/etl/platform.h
#	test/vs2019/etl.vcxproj
#	test/vs2019/etl.vcxproj.filters
2022-01-23 18:26:52 +00:00
John Wellbelove
13b28387c5 Merge branch 'feature/reduce-size-of-state_chart' into development 2022-01-23 14:23:44 +00:00
John Wellbelove
2353672b64 Renamed compile time state machine classes 2022-01-23 10:46:35 +00:00
John Wellbelove
4d0682e196 Merge branch 'hotfix/bitset' into development 2022-01-22 16:17:09 +00:00
John Wellbelove
e98270ca60 Bitset updates 2022-01-22 16:16:44 +00:00
Tom
1f7ebe3ee8
Added to_string, to_ulong and to_ullong to bitset (#499)
* Added to_string, to_ulong and to_ullong to bitset

* Reverted whitspace changes

* Arduino has NAN defined, but not nan, nanf nor nanl

(it got __builtin_nan, but I don't think this is what we want here...)

* Added missing typenames
2022-01-22 11:48:34 +00:00
Tom
b5a5f0e83a
Fixed bug where invert changed bits over the TOP_MASK (#500) 2022-01-22 11:48:08 +00:00
Tom
09e7b3ff1f
Handled SIZE == 0 edge cases (#501) 2022-01-22 11:47:39 +00:00
John Wellbelove
d2e4774ca1 Improved support for MSVC language level detection 2022-01-21 10:05:47 +00:00
John Wellbelove
fc59b4e34e Latest state chart code
Reinstated virtual process_event()
2022-01-20 11:05:37 +00:00
John Wellbelove
f3973e4935 Latest state chart code
Reinstated virtual process_event()
2022-01-18 20:15:56 +00:00
John Wellbelove
7c3c7ea05e Removal of redundant code 2022-01-18 20:14:55 +00:00
John Wellbelove
8337c87f16 Initial state_chart changes 2022-01-17 11:19:19 +00:00
John Wellbelove
e263a7cb75 Initial state_chart changes 2022-01-16 13:30:52 +00:00
John Wellbelove
0a6e22ae2a Initial state_chart changes 2022-01-15 19:06:20 +00:00
John Wellbelove
c3b603be32 Fixed IAR warnings in binary.h
Fixe unaligned type_comment
platform.h comments
Fixed etl_profile.h to native little endian for !C++20 or !STL
2022-01-14 10:08:46 +00:00
John Wellbelove
912427849d Updated version numbers 2022-01-13 12:46:41 +00:00
John Wellbelove
f8b2773684 Some ETL_CONSTEXPR. Added size() 2022-01-13 10:53:14 +00:00
John Wellbelove
f58a20294a Added index operators
Split code into type and non-type dependent classes
2022-01-12 18:36:34 +00:00
John Wellbelove
17c287af9d Completed unaligned_type 2022-01-11 17:44:40 +00:00
John Wellbelove
7f6b6d9098 Updates to endianness 2022-01-11 17:43:53 +00:00
John Wellbelove
cf0daf6c6b Changed inline functions to templates 2022-01-11 17:43:30 +00:00
John Wellbelove
cb243f78ca Updated bit_cast 2022-01-11 17:42:56 +00:00
John Wellbelove
9bea87dd90 Removed unnecessary inline keywords 2022-01-11 16:19:24 +00:00
John Wellbelove
973e0f8ea6 Renamed 8bit check macro 2022-01-10 00:35:02 +00:00
John Wellbelove
f06a027da7 Moved void_t definition 2022-01-08 19:27:16 +00:00
John Wellbelove
6b123e1bdb Merge branch 'feature/bit_cast-midpoint-lerp' into feature/unaligned-types
# Conflicts:
#	include/etl/endianness.h
#	test/vs2019/etl.vcxproj.filters
2022-01-08 18:53:17 +00:00
John Wellbelove
e6736404ed Final code after local CI tests 2022-01-08 18:51:35 +00:00
John Wellbelove
c99d984453 Updates to bin.h, binary.h and endian.h 2022-01-08 11:38:04 +00:00
John Wellbelove
79c659b0bb unaligned and endianess experiments 2022-01-06 10:18:58 +00:00
John Wellbelove
2cf77bf837 Initial experimental unaligned fundamental types 2022-01-04 12:32:56 +00:00
John Wellbelove
7c4fbcc8f0 Initial experimental unaligned fundamental types 2022-01-04 12:04:56 +00:00
John Wellbelove
dc2ad30294 Iterator is more SFINAE compatible 2022-01-03 18:23:04 +00:00
John Wellbelove
9665ab21c1 Updated endianness for C++20 2022-01-03 18:22:08 +00:00
John Wellbelove
b8579f0151 Initial bit tests 2022-01-03 18:21:45 +00:00
John Wellbelove
dc563239e5 Added all permutations of leading/trailing bit tests 2022-01-03 18:21:19 +00:00
John Wellbelove
d4cc115509 Modified C++ language level detection 2022-01-03 18:20:14 +00:00
John Wellbelove
cf0b816bc1 Update to support C++20 2022-01-02 14:20:10 +00:00
John Wellbelove
7ad3b51308 Added etl::lerp & initial reverse engineered <bit> header 2021-12-31 09:52:02 +00:00
John Wellbelove
4f05600900 Added delegate test from std::function 2021-12-30 09:36:36 +00:00
John Wellbelove
2643f8ef4b Added etl::midpoint 2021-12-28 18:42:17 +00:00
John Wellbelove
e4ab79b243 Initial code 2021-12-24 13:13:32 +00:00
John Wellbelove
064c7dc16b GCC fixes for unit tests 2021-12-24 09:25:24 +00:00
John Wellbelove
b98fd16e36 array_view updates 2021-12-22 18:58:15 +00:00
John Wellbelove
de5a90a91c Added Green Hills compiler to minmax push and pop
message_packet updates

message_packet updates

span updates

message_packet updates

message_packet updates

Remove superfluous line

Fixe undefined behaviour in test
2021-12-21 12:04:51 +00:00
John Wellbelove
6f6ebe456b Fix for double formatting with precision > 9 (#480)
* Add a test that reproduces the double formatting failure

* Fix root cause, restrict precision to 9 on 32 bit platforms, unrestricted on 64 bit
2021-12-15 19:26:17 +00:00
Noah Luskey
36782f77c0 Fix for double formatting with precision > 9 (#480)
* Add a test that reproduces the double formatting failure

* Fix root cause, restrict precision to 9 on 32 bit platforms, unrestricted on 64 bit
2021-12-15 17:27:57 +00:00
John Wellbelove
4acad4206d Disable span TContainer constructor for arrays 2021-12-15 12:48:39 +00:00
John Wellbelove
67474499c2 Disable span TContainer constructor for arrays 2021-12-15 12:21:10 +00:00
John Wellbelove
cb7ee61b33 Disable span TContainer constructor for arrays 2021-12-14 17:23:26 +00:00
John Wellbelove
6827a73ff8 Disable span TContainer constructor for arrays 2021-12-14 17:23:26 +00:00
John Wellbelove
d2ba5e9956 Multiple code changes, delegates & timers 2021-12-14 10:52:49 +00:00
John Wellbelove
331e07b272 Multiple code changes, delegates & timers 2021-12-13 17:16:21 +00:00
John Wellbelove
44715cadfe Experimental code 2021-12-12 18:20:45 +00:00
John Wellbelove
6b91aaeb1d Merge branch 'development' of https://github.com/ETLCPP/etl into development 2021-12-05 15:54:33 +00:00
John Wellbelove
06e8aaf8d4 #475 When ETL_NO_ATOMICS is defined the timer.h file should not define timer_semaphore_t
#471 Add contains() method to etl::map and etl::set
#477 deque::resize should throw deque_full if requested size is too large
2021-12-05 15:39:11 +00:00
John Wellbelove
f5514104e7 contains() & transparent comparator 2021-12-04 17:28:47 +00:00
John Wellbelove
6e1e75094f Re-enable multi_vector 2021-12-04 11:00:51 +00:00
John Wellbelove
c6ff32e901 contains() & transparent comparator 2021-12-04 10:24:04 +00:00
John Wellbelove
4d48082f4f contains() & transparent comparator for map, multimap, set and multiset 2021-12-01 18:42:22 +00:00
John Wellbelove
85fb83f0be contains() & transparent comparator for reference set and multiset 2021-12-01 13:19:31 +00:00
John Wellbelove
a16ae414a2 contains() & transparent comparator for set and multiset 2021-11-27 18:42:30 +00:00
John Wellbelove
042da035fa contains() & transparent comparator for map and multimap 2021-11-27 17:57:51 +00:00
John Wellbelove
015003fa03 contains() for etl::map 2021-11-26 19:35:18 +00:00
John Wellbelove
5fa7ee22ab Merge branch 'master' into feature/constexpr-for-string_view
# Conflicts:
#	include/etl/array.h
#	include/etl/deque.h
#	include/etl/forward_list.h
#	include/etl/generators/type_traits_generator.h
#	include/etl/list.h
#	include/etl/platform.h
#	include/etl/vector.h
#	meson.build
#	test/test_array.cpp
#	test/test_deque.cpp
#	test/test_flat_map.cpp
#	test/test_flat_multimap.cpp
#	test/test_flat_multiset.cpp
#	test/test_flat_set.cpp
#	test/test_forward_list.cpp
#	test/test_list.cpp
#	test/test_map.cpp
#	test/test_multimap.cpp
#	test/test_multiset.cpp
#	test/test_set.cpp
#	test/vs2019/etl.vcxproj.filters
2021-11-26 18:10:57 +00:00
John Wellbelove
3e98f4c537 Fixes for Ubuntu 18 2021-11-21 16:45:37 +00:00
John Wellbelove
ed0d2f5759 Fixes for Ubuntu 18 2021-11-21 16:38:16 +00:00
John Wellbelove
6c3deb2426 Fixes for Ubuntu 18 2021-11-21 16:25:18 +00:00
John Wellbelove
02cee8c2a3 Fixes for Ubuntu 18 2021-11-21 16:17:23 +00:00
John Wellbelove
e3aea9105c Fixes for Ubuntu 18 2021-11-21 16:07:44 +00:00
John Wellbelove
2ecc0aa287 Fixes for Ubuntu 18 2021-11-21 14:47:16 +00:00
John Wellbelove
42f9505237 Fixes for Ubuntu 18 2021-11-21 14:37:58 +00:00
John Wellbelove
f5f93926c9 Fixes for Ubuntu 18 2021-11-21 14:32:49 +00:00
John Wellbelove
b9778190dc Updated version numbers 2021-11-21 12:35:30 +00:00
John Wellbelove
fa637f794e Update to const_iterator parameter for insert. 2021-11-21 10:36:09 +00:00
John Wellbelove
8872b9a0ae const_iterator parameters for containers 2021-11-20 19:04:39 +00:00
John Wellbelove
11fa2e4e38 Merge branch 'hotfix/remove-template-overload-abiguity' into development
# Conflicts:
#	include/etl/forward_list.h
#	include/etl/list.h
#	include/etl/vector.h
#	test/test_forward_list.cpp
#	test/test_list.cpp
2021-11-19 11:23:50 +00:00
John Wellbelove
7aaf37e21d Updated deque 2021-11-19 11:20:49 +00:00
Bo Rydberg
a41418ed91
Fix compile error for vector assign and insert with same type non-iterator (#466) 2021-11-19 11:05:04 +00:00
Bo Rydberg
e4431d3940
Fix compile error insert/assign two same types non-iterator (#467)
Assignent and insert_after of count and values of same types has to work
2021-11-19 11:04:41 +00:00
Bo Rydberg
94507ad1c6
Fix list insert and assign errors (#468)
Also fixing some test asserts related to etl::list.
2021-11-19 11:04:10 +00:00
John Wellbelove
b61c5e0442 Modified deque const_iterator to iterator 2021-11-18 13:29:48 +00:00
John Wellbelove
642e36a9c4 Modified deque const_iterator to iterator 2021-11-18 12:58:33 +00:00
Steffen Zimmermann
08218d71cd harmonize copy ctor and asignment op for etl::delegate (#465)
etl::delegate has a user-written copy constructor and a defaulted assignment
operator. The copy constructor does the same as a defaulted copy constructor,
therefore there is no need to add a user-written copy constructor.

The combination of user-written copy constructor and defaulted assignment
operator causes a warning in Coverity, a static code analyzer:

copy_without_assign: Class etl::delegate<void ()> has a user-written copy constructor etl::delegate<void ()>::delegate(etl::delegate<void ()> const &) but no corresponding user-written assignment operator.

This commit replaces the user-written copy constructor with a defaulted copy
constructor, which does the same.
2021-11-18 12:26:15 +00:00
John Wellbelove
5baa1af862 Make functions for containers 2021-11-18 12:26:15 +00:00
John Wellbelove
52586af2de Latest implementations 2021-11-18 12:26:15 +00:00
John Wellbelove
8fc7e0208a Added 'make' functions to construct containers
Added tests for 'make' and 'template deduction'
2021-11-18 12:26:13 +00:00
John Wellbelove
d93834ed83 constexpr for enum_type 2021-11-18 12:25:31 +00:00
John Wellbelove
58013e8257 changed iterator parameters to const_iterator 2021-11-17 17:59:57 +00:00
Steffen Zimmermann
d05bf1b4fd
let map/multimap/set/multiset return iterator on erase (#463)
Beginning with C++11, erase(iterator) and erase(const_iterator) returns
an iterator following the removed element.
2021-11-15 10:26:23 +00:00
John Wellbelove
0acd537a7e Updates 2021-11-15 09:37:22 +00:00
John Wellbelove
d4a22293c7 Added missing includes 2021-11-15 09:37:21 +00:00
John Wellbelove
8f02e90735 Experimental automatic builtins for algorithms 2021-11-15 09:37:21 +00:00
John Wellbelove
e296bd24f7 Make functions for containers 2021-11-15 09:32:50 +00:00
John Wellbelove
d03e6f5587 Latest implementations 2021-11-15 09:32:12 +00:00
John Wellbelove
84974acbfa Added 'make' functions to construct containers
Added tests for 'make' and 'template deduction'
2021-11-15 09:32:11 +00:00
John Wellbelove
bb72ded2e2 constexpr for enum_type 2021-11-15 09:31:30 +00:00
Jeremy Overesch
beadf9e898 Remove unnecessary casts that causes warnings. (#461) 2021-11-15 09:31:30 +00:00
John Wellbelove
29d711003f Added non-const string pointer overload 2021-11-15 09:31:30 +00:00
John Wellbelove
f459c3e190 First experiments 2021-11-15 09:31:30 +00:00
Jeremy Overesch
331e44b0ac Change != to < in ipool to get rid of erroneous clang-tidy nullptr dereference warning (#457) 2021-11-15 09:31:30 +00:00
Steffen Zimmermann
c412277bb9 add ifdef guard for msvc pragma (#455)
There was a msvc specific pragma to disable a warning which causes compiler warnings for non-msvc compilers.
Additionally added a push/pop paradigm to restore the original warning state correctly.
2021-11-15 09:31:29 +00:00
mhx
fccebd4724 Fix constexpr accepts() implementation to be C++11 compliant (#452)
In C++11, `constexpr` functions must not contain compound statements.
This change makes the implementation of `message_packet::accepts` use
a single conjunction instead of a `switch` statement.

See https://gcc.godbolt.org/z/zKbsx3nY5.

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2021-11-15 09:31:29 +00:00
mhx
0759d3f2ee Fix constexpr accepts() implementation to be C++11 compliant (#451)
In C++11, `constexpr` functions must not contain compound statements.
This change makes the implementation of `message_packet::accepts` use
a single conjunction instead of a `switch` statement.

See https://gcc.godbolt.org/z/zKbsx3nY5.
2021-11-15 09:31:29 +00:00
John Wellbelove
36bb393d7a Fix compiler warnings 2021-11-15 09:31:29 +00:00
Jeremy Overesch
c70db16a20
Remove unnecessary casts that causes warnings. (#461) 2021-11-10 17:31:31 +00:00
John Wellbelove
1b7a59be92 Added non-const string pointer overload 2021-11-06 16:45:06 +00:00
Jeremy Overesch
2c42e9f91b Change != to < in ipool to get rid of erroneous clang-tidy nullptr dereference warning (#457) 2021-11-04 12:15:54 +01:00
John Wellbelove
dd77b4ec70 First experiments 2021-11-04 12:15:14 +01:00
Steffen Zimmermann
4068482bd5
add ifdef guard for msvc pragma (#455)
There was a msvc specific pragma to disable a warning which causes compiler warnings for non-msvc compilers.
Additionally added a push/pop paradigm to restore the original warning state correctly.
2021-10-29 12:16:26 +01:00
John Wellbelove
9c8bf85e8d Merge branch 'hotfix/fix-cpp11-pedantic-constexpr' into development 2021-10-27 10:43:49 +01:00
John Wellbelove
946b48cbf1 Merge branch 'hotfix/#454-fix-compiler-error-msvc-16' into development 2021-10-27 09:48:13 +01:00
John Wellbelove
ea11ee8818 Fix compiler warnings 2021-10-27 09:47:52 +01:00
John Wellbelove
e6dd894896 Experimental automatic builtins for algorithms 2021-10-26 17:27:05 +01:00
John Wellbelove
b292e58ee4 Experimental automatic builtins for algorithms 2021-10-25 14:01:07 +01:00
mhx
b4c4d8ac4a
Fix constexpr accepts() implementation to be C++11 compliant (#452)
In C++11, `constexpr` functions must not contain compound statements.
This change makes the implementation of `message_packet::accepts` use
a single conjunction instead of a `switch` statement.

See https://gcc.godbolt.org/z/zKbsx3nY5.

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2021-10-25 13:46:00 +01:00
John Wellbelove
76f2a97d87 Experimental automatic builtins for algorithms 2021-10-25 09:56:40 +01:00
mhx
efb9c04a45
Fix constexpr accepts() implementation to be C++11 compliant (#451)
In C++11, `constexpr` functions must not contain compound statements.
This change makes the implementation of `message_packet::accepts` use
a single conjunction instead of a `switch` statement.

See https://gcc.godbolt.org/z/zKbsx3nY5.
2021-10-22 19:11:47 +01:00
John Wellbelove
690044e7ff constexpr for etl::string_view 2021-10-21 09:31:49 +01:00
John Wellbelove
998322d02c Add available_bytes to byte_stream_reader & byte_stream_writer 2021-10-21 09:26:20 +01:00
John Wellbelove
7124b86b88 Merge branch 'hotfix/disable-begin-end-size-for-no-stl' into development 2021-10-20 13:35:08 +01:00
John Wellbelove
f3bf0dc7fe Disable etl::begin(), etl::end() and etl::size() for ETL_NO_STL 2021-10-20 13:34:44 +01:00
John Wellbelove
4bedc041d4 Various updates 2021-10-12 17:52:51 +01:00
John Wellbelove
9e6baeb758 Merge branch 'feature/updates-to-delegate' into development 2021-10-12 16:28:41 +01:00
John Wellbelove
fbda92f67f Replace constexpr with ETL_CONSTEXPR in etl::delegate 2021-10-12 15:57:41 +01:00
Sergey Skorokhod
0ca5f274e1
missed 'typename' keyword added (#445)
Co-authored-by: Sergey Skorokhod <s.skorokhod@1440.space>
2021-10-12 15:37:44 +01:00
John Wellbelove
6af5a0bbd2 Added missing explicit initialisation from in_place structures. 2021-10-12 14:56:01 +01:00
Steffen Zimmermann
bc095c9993 fix PARAMETER_HIDDEN (#444)
found with Coverity static code analyzer:
declaration hides parameter "pbucket" (declared in line 1404)
2021-10-12 14:56:01 +01:00
John Wellbelove
dc34be793e Added missing explicit initialisation from in_place structures. 2021-10-12 14:51:39 +01:00
Steffen Zimmermann
7968c5c448
fix PARAMETER_HIDDEN (#444)
found with Coverity static code analyzer:
declaration hides parameter "pbucket" (declared in line 1404)
2021-10-12 10:16:55 +01:00
John Wellbelove
67067605a8 Updates to delegate 2021-10-11 12:32:17 +01:00
John Wellbelove
db46cc5dec Added set() member functions 2021-10-09 14:28:37 +01:00
John Wellbelove
0d612f1317 Added missing read() member functions in byte_stream_reader
Updated version numbers
2021-10-07 15:11:43 +01:00
John Wellbelove
2d64b77e4a Modified read_unchecked & write_unchecked
Added start/length read/write implementations
2021-10-05 14:24:46 +01:00
John Wellbelove
4e4c781e18 Updated versions 2021-10-04 20:00:45 +01:00
John Wellbelove
609c0c1ebc Merge branch 'feature/#430-add-peek-to-queue_spsc_atomic' into development
# Conflicts:
#	.gitignore
2021-10-04 17:30:55 +01:00
John Wellbelove
4b67f54f1f Added read_unchecked & write_unchecked 2021-10-04 16:59:42 +01:00
John Wellbelove
71f42a7563 Merge branch 'feature/#429-scatter-gather-span-based-class' into development
# Conflicts:
#	.gitignore
#	include/etl/byte_stream.h
#	test/vs2019/etl.vcxproj.filters
2021-10-03 20:26:20 +01:00
John Wellbelove
605655d58b Added multi_span iterator and tests 2021-10-03 20:19:15 +01:00
John Wellbelove
f35271e695 Added public access for base class for iterator 2021-10-03 20:18:51 +01:00
John Wellbelove
08e08b9165 Merge branch 'feature/#433-pool-ext-variant-pool-ext' into development
# Conflicts:
#	.gitignore
2021-10-03 16:10:28 +01:00
John Wellbelove
ec64141598 #438 void* reader writer API 2021-10-03 15:38:50 +01:00
John Wellbelove
aaa00ca610 Added pool_ext & generic_pool_ext 2021-10-03 11:50:40 +01:00
John Wellbelove
3f79e61f97 Add front() to locked queues 2021-10-02 14:27:23 +01:00
Daniel B
494059fd6b
Feature/pool ext variant pool ext (#433)
* added threads dependency to meson build because of pthread linkage problems (gcc version Debian 8.3.0-6)

* initial version of generic_pool_ext, pool_ext and variant_pool_ext (extended unit tests)

* format code

* fix test_call_if_and_not_valid_returning_void by moving SetupFixture into namespace (to ensure correct test setup)

Co-authored-by: Daniel B <daniel-brosche@users.noreply.github.com>
2021-10-01 18:46:52 +01:00
John Wellbelove
88f2ff8e63 Updated version numbers 2021-10-01 18:41:59 +01:00
John Wellbelove
ff3f62bc0b Fixed etl::cyclic_value for ARMCC v5 compatibility 2021-10-01 18:41:59 +01:00
John Wellbelove
c691991538 Removed warning from compilation 2021-10-01 18:41:35 +01:00
John Wellbelove
f987d2a287 Fixes to byte_stream_reader for const data 2021-10-01 18:41:35 +01:00
John Wellbelove
05f17e1d74 #428 byte_stream_reader can't be used to read a span of const data 2021-10-01 18:41:35 +01:00
John Wellbelove
579527a932 Fixes to byte_stream_reader for const data 2021-10-01 18:41:35 +01:00
fractalembedded
71c8544f35
Add peek to queue_spsc_atomic (#430) 2021-10-01 18:41:16 +01:00
John Wellbelove
817ae15c7a Work in progress 2021-10-01 14:10:14 +01:00
John Wellbelove
b47e58a8fe Merge branch 'hotfix/byte_stream_reader-with-const-char-data' into development 2021-09-29 18:50:01 +01:00
John Wellbelove
2fd15f9f68 Fixes to byte_stream_reader for const data 2021-09-29 18:49:27 +01:00
John Wellbelove
b9b7b9cd7a #431 CMSIS-RTOS2 support 2021-09-28 18:06:30 +01:00
John Wellbelove
a6d8a6d1ef Updated version numbers 2021-09-27 14:06:47 +01:00
John Wellbelove
1b0ddc540e Fixed etl::cyclic_value for ARMCC v5 compatibility 2021-09-27 13:30:59 +01:00
John Wellbelove
9f976d98b9 #428 byte_stream_reader can't be used to read a span of const data 2021-09-24 09:44:49 +01:00
John Wellbelove
49c9393537 Fixes to byte_stream_reader for const data 2021-09-23 11:49:16 +01:00
John Wellbelove
0754b3380e Updated versions 2021-09-21 11:09:34 +01:00
John Wellbelove
f2b4eef277 Temporarily disable multi_vector 2021-09-21 11:06:44 +01:00
John Wellbelove
acf0f06398 Merge branch 'hotfix/replace-std-size_t-with-size_t' into development 2021-09-21 10:20:17 +01:00
John Wellbelove
877f1a4d5d Replaced std::size_t with size_t 2021-09-21 10:19:52 +01:00
John Wellbelove
bdf1451655 Added multi_vector 2021-09-10 12:12:18 +01:00
John Wellbelove
5093189a7b Updated version numbers 2021-09-09 17:36:56 +01:00
John Wellbelove
c8cde6f605 Added successor handling for accepts
Added successor handling for pre-C++17 message router
2021-09-09 17:08:14 +01:00
John Wellbelove
7f6548e02b Added successor handling for accepts
Added successor handling for pre-C++17 message router
2021-09-09 16:07:51 +01:00
John Wellbelove
e6c13c75e7 Added result type 2021-09-05 17:39:56 +01:00
John Wellbelove
aaac4ba97c Updated version
Modified etl::result test
2021-09-05 14:59:17 +01:00
John Wellbelove
2cdfba4297 Added result type 2021-09-04 14:54:04 +01:00
John Wellbelove
81807b2fd2 Added result type 2021-09-04 13:34:02 +01:00
John Wellbelove
ee46d76548 Additional member functions 2021-09-02 16:07:09 +01:00
John Wellbelove
ca55664b67 Initial byte_stream code 2021-09-02 13:10:02 +01:00
John Wellbelove
3b112da068 Added call_if and call_or member functions. 2021-09-02 13:04:28 +01:00
John Wellbelove
dd19cb2e47 Working code including 64 bit 2021-09-02 13:04:27 +01:00
John Wellbelove
72468bace8 Pre-release code 2021-09-02 13:04:27 +01:00
John Wellbelove
07070085e8 Working code 2021-09-02 13:03:39 +01:00
John Wellbelove
d79b13bd52 Added missing #include for variant.
Updated version numbers
2021-09-02 13:03:38 +01:00
Benedek Kupper
a653a22dd9 to_string_helper: add string conversion helper for denominated integers (#408)
With default format it will only print the meaningful fractional digits.
If the format specifies the precision, it will print at least that many
fractional digits.

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>
2021-09-02 13:03:38 +01:00
John Wellbelove
442a76ec46 Fixed incomplete template specialisations in type_traits.h 2021-09-02 13:03:38 +01:00
CanastraRF
988db811c9 literal with suffix (#416) 2021-09-02 13:03:38 +01:00
John Wellbelove
c315efc623 Fix for etl::mutex::try_lock() for GCC 2021-09-02 13:03:37 +01:00
Dmitri Vorobyov
c497c5a4c7 fix try_lock in gcc mutex (#415) 2021-09-02 13:03:37 +01:00
John Wellbelove
46f4bb86d1 Successor handling for all derived message router types 2021-09-02 13:03:36 +01:00
John Wellbelove
17931057b5 Remove clang warning 2021-09-02 13:03:36 +01:00
John Wellbelove
3831d4fd68 Added successor call to receive() 2021-09-02 13:03:36 +01:00
John Wellbelove
6fb9357b7c Added cbegin() & cend() 2021-08-24 12:12:19 +01:00
John Wellbelove
5cbe4fb3e1 Read write span ranges 2021-08-22 12:58:32 +01:00
John Wellbelove
26c89064fc Additional read/write functions 2021-08-22 10:13:53 +01:00
John Wellbelove
133ff78330 Added templated etl::write & etl::read functions for byte stream 2021-08-21 09:54:31 +01:00
John Wellbelove
c3e040949a Span access is only for sizeof(T) == 1 2021-08-21 00:18:54 +01:00
John Wellbelove
42d451dc79 Expanded tests and updated make lists 2021-08-20 19:39:49 +01:00
John Wellbelove
ed74f8bc54 Initial byte_stream code 2021-08-20 10:22:44 +01:00
John Wellbelove
c1e4c5b670 Initial byte_stream code 2021-08-18 13:01:46 +01:00
John Wellbelove
fa4536eabf Merge branch 'development' 2021-08-13 20:45:49 +01:00
John Wellbelove
a10dfd433a Issue #413 Queue's pop_into copies rather than moves 2021-08-13 19:21:48 +01:00
John Wellbelove
c3e44778e6 Merge branch 'development'
# Conflicts:
#	support/Release notes.txt
2021-08-13 17:07:05 +01:00
John Wellbelove
417c3b9e77 Expanded compiled variants for scripts 2021-08-13 16:32:43 +01:00
John Wellbelove
21e114c252 Fixed etl::fsm C++03 template definition that was corrupted in 20.10.0
Fixed meson.build
2021-08-12 10:50:24 +01:00
John Wellbelove
6ff560a416 Merge branch 'feature/variadic-message-router' into development
# Conflicts:
#	.gitignore
#	include/etl/bip_buffer_spsc_atomic.h
#	include/etl/version.h
#	library.json
#	library.properties
#	support/Release notes.txt
#	test/etl_profile.h
#	test/runsanitychecks.sh
#	test/runtests.sh
#	test/vs2019/etl.vcxproj.filters
2021-08-11 15:50:43 +01:00
John Wellbelove
988cd95440 Added C++17 variadic versions of etl::message_router ans etl::fsm
Fixed meson.build
2021-08-11 15:48:17 +01:00
John Wellbelove
5904687e6d Variadic FSM 2021-08-10 20:25:27 +01:00
John Wellbelove
774384e316 Fixes after merge 2021-08-10 12:37:33 +01:00
John Wellbelove
27f5204032 Added 'Force C++03' macro 2021-08-10 11:31:14 +01:00
John Wellbelove
f413fd1a21 Fixes after merge 2021-08-10 11:20:00 +01:00
John Wellbelove
ca322551f3 Variadic message_packet 2021-08-10 10:49:32 +01:00
John Wellbelove
ecff863087 notify_observers() takes universal reference for C++11 and above 2021-08-10 10:49:11 +01:00
John Wellbelove
a7786e08af Updated type traits generator 2021-08-10 10:49:11 +01:00
John Wellbelove
79ffe63b1c Refactoring of type traits for GCC compatibility 2021-08-10 10:49:10 +01:00
John Wellbelove
8181cec767 Updated version numbers 2021-08-10 10:49:10 +01:00
Benedek Kupper
3363da4f91 Feature/bip buffer spsc atomic (#402 follow-up) (#404)
* bip_buffer_spsc_atomic: fix compiler failure

The previous commit changed the pointer being const (cannot change where
the pointer is pointing after construction) to the referred data
to be const (the buffer itself is not writeable), which causes compiler
issue with the tests.

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>

* bip_buffer_spsc_atomic: whitespace cleanup for consistency

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>

* bip_buffer_spsc_atomic: clear() destroys the unread data

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>

* bip_buffer_spsc_atomic: add destructor

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>
2021-08-10 10:38:23 +01:00
John Wellbelove
1789e4937d Changes before merging to development 2021-08-10 10:38:23 +01:00
Benedek Kupper
7a067ba816 introduce bip buffer spsc atomic (#402)
Based on the works of Andrea Lattuada and James Munns:
https://blog.systems.ethz.ch/blog/2019/the-design-and-implementation-of-a-lock-free-ring-buffer-with-contiguous-reservations.html
Whose design was inspired by Simon Cooke:
https://www.codeproject.com/Articles/3479/The-Bip-Buffer-The-Circular-Buffer-with-a-Twist

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>
2021-08-10 10:38:22 +01:00
John Wellbelove
d40a67776f notify_observers() takes universal reference for C++11 and above 2021-08-05 16:52:35 +01:00
John Wellbelove
c265e82bbe Updated type traits generator 2021-08-05 09:23:02 +01:00
John Wellbelove
b779696eb9 Refactoring of type traits for GCC compatibility 2021-08-04 18:47:42 +01:00
John Wellbelove
026a365f8e Updated version numbers 2021-08-04 10:27:22 +01:00
John Wellbelove
0d5f30b97e Merge branch 'master' into feature/bip-buffer-spsc-atomic
# Conflicts:
#	test/vs2019/etl.vcxproj.filters
2021-08-02 12:22:01 +01:00
John Wellbelove
86d1bd7890 etl::message_packet update 2021-08-01 20:01:30 +01:00
John Wellbelove
c868acaa9b Updated versions 2021-08-01 20:01:30 +01:00
John Wellbelove
a0c18c56af Changed std::forward to etl::forward 2021-08-01 20:01:29 +01:00
John Wellbelove
78239ec2ef Updated versions 2021-08-01 19:39:14 +01:00
John Wellbelove
c1f7edeee6 Changed std::forward to etl::forward 2021-08-01 19:37:03 +01:00
John Wellbelove
e92f93b57f Variadic message_packet 2021-07-31 10:38:21 +01:00
John Wellbelove
35ac4cb239 Variadic message_packet 2021-07-29 17:20:40 +01:00
John Wellbelove
b886ee381b Updated version numbers 2021-07-29 14:29:00 +01:00
John Wellbelove
734f14a8ec Changed variant files names 2021-07-29 14:29:00 +01:00
John Wellbelove
2c11956311 Updated version numbers 2021-07-29 14:27:41 +01:00
John Wellbelove
031b3e7eda Changed variant files names 2021-07-29 14:15:49 +01:00
John Wellbelove
fd89f51621 Type traits refactor 2021-07-29 11:34:16 +01:00
John Wellbelove
1702a6e043 Type traits refactor 2021-07-27 18:17:42 +01:00
John Wellbelove
8f570d81cd Work in progress 2021-07-26 09:29:11 +01:00
John Wellbelove
017095bef3 Merge branch 'master' into development
# Conflicts:
#	support/Release notes.txt
#	test/vs2019/etl.vcxproj.filters
2021-07-23 13:48:52 +01:00
John Wellbelove
23b8ffcd20 updated version numbers 2021-07-23 13:39:24 +01:00
John Wellbelove
7a061a43cd Altered 'unhandled' delegate to tbe the last in the array for the constexpr vspecialisation. 2021-07-23 12:50:17 +01:00
John Wellbelove
d49c2d28e0 Added compile time constexpr initialisation 2021-07-23 10:21:11 +01:00
John Wellbelove
cee880b2e6 Changed 'class' to 'typename'. 2021-07-19 12:51:54 +01:00
John Wellbelove
140c69e6ea Updated version numbers 2021-07-18 20:22:12 +01:00
John Wellbelove
a7420267a6 Cross compiler compatibity changes 2021-07-18 09:53:13 +01:00
John Wellbelove
e9a9e8d1af Merge branch 'feature/variadic-variant' into development
# Conflicts:
#	.gitignore
#	arduino/examples/Vector_Examples/Example_Vector_1_simple_use/Example_Vector_1_simple_use.ino
#	include/etl/version.h
#	library.json
#	library.properties
#	meson.build
#	support/Release notes.txt
#	test/vs2019/etl.vcxproj.filters
2021-07-17 23:51:16 +01:00
John Wellbelove
aa98a60822 etl::variant release candidate 2021-07-17 23:45:28 +01:00
John Wellbelove
7b63b567b6 Fixes for cross compiler cmpatibility
Added tests for all get<>() functions
2021-07-16 22:21:42 +01:00
Benedek Kupper
ed0dbc00c2
Feature/bip buffer spsc atomic (#402 follow-up) (#404)
* bip_buffer_spsc_atomic: fix compiler failure

The previous commit changed the pointer being const (cannot change where
the pointer is pointing after construction) to the referred data
to be const (the buffer itself is not writeable), which causes compiler
issue with the tests.

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>

* bip_buffer_spsc_atomic: whitespace cleanup for consistency

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>

* bip_buffer_spsc_atomic: clear() destroys the unread data

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>

* bip_buffer_spsc_atomic: add destructor

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>
2021-07-16 11:42:35 +01:00
John Wellbelove
9c68847c5c Compiler compatibility changes 2021-07-15 12:57:46 +01:00
John Wellbelove
de1a19775e Re-enabled all variant unit tests 2021-07-14 12:37:24 +01:00
John Wellbelove
0bdd5943da Work in progress 2021-07-13 21:24:12 +01:00
John Wellbelove
56c75a3ae5 Refactored operation functions into one. 2021-07-13 19:57:24 +01:00
John Wellbelove
109997b8d6 Work in progress 2021-07-13 17:15:25 +01:00
John Wellbelove
590b26e513 Added conjunction and disjunction 2021-07-12 16:26:50 +01:00
John Wellbelove
197f65c5da Compiler compatibility updates 2021-07-12 00:51:53 +01:00
John Wellbelove
c54bf63a76 Resolved issues with universal references in construction and assignment.
Added 'in_place' structures.
Added etl::overload.
Updated sanity check cmake files.
Added alignment for const void.
2021-07-11 20:36:01 +01:00
John Wellbelove
d13bf7d5df Changes before merging to development 2021-07-06 18:49:27 +01:00
Benedek Kupper
acf4945023
introduce bip buffer spsc atomic (#402)
Based on the works of Andrea Lattuada and James Munns:
https://blog.systems.ethz.ch/blog/2019/the-design-and-implementation-of-a-lock-free-ring-buffer-with-contiguous-reservations.html
Whose design was inspired by Simon Cooke:
https://www.codeproject.com/Articles/3479/The-Bip-Buffer-The-Circular-Buffer-with-a-Twist

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>
2021-07-06 15:42:37 +01:00
John Wellbelove
7bb438bf1b Added the option to derive etl::message<> from a custom parent class 2021-06-30 20:57:42 +01:00
Manuel Seeböck
38d8452e70
added optional template parameter to etl::imessage to specify a base class other than imessage (#401)
Co-authored-by: Manuel Seeböck <seeboeck@pjm.co.at>
2021-06-30 13:33:05 +01:00
John Wellbelove
ef6885c02c Unified vector asserts 2021-06-30 11:25:37 +01:00
John Wellbelove
7e9ca31fb1 Updated overloads 2021-06-29 20:04:18 +01:00
John Wellbelove
e8a6e12ca1 Renamed mem_type to mem_cast 2021-06-29 20:03:55 +01:00
John Wellbelove
eb6d5637d4 Added experimental uni_type 2021-06-29 20:03:55 +01:00
John Wellbelove
f956cc19b4 Renamed mem_type to mem_cast 2021-06-29 20:03:31 +01:00
John Wellbelove
67b17b2635 Added experimental uni_type 2021-06-29 20:02:32 +01:00
John Wellbelove
f0358764c8 Updated Arduino examples 2021-06-29 19:59:09 +01:00
John Wellbelove
6f3caa6ede C++20 compatibility for deprecated std::is_pod 2021-06-29 19:58:30 +01:00
John Wellbelove
dee32492bd Deleted experimental files 2021-06-29 19:58:30 +01:00
John Wellbelove
0d7405de0d Fixed swapped HUGE_VAL & HUGE_VALF definitions 2021-06-29 19:58:30 +01:00
John Wellbelove
7933e146fc Updated Arduino examples 2021-06-29 19:15:07 +01:00
John Wellbelove
aed7417bae C++20 compatibility for deprecated std::is_pod 2021-06-24 20:38:57 +01:00
John Wellbelove
b1aa00df47 Deleted experimental files 2021-06-24 18:14:25 +01:00
John Wellbelove
49630a58c8 Fixed swapped HUGE_VAL & HUGE_VALF definitions 2021-06-22 20:32:57 +01:00
John Wellbelove
2025e6ff9b Latest updates 2021-06-22 14:18:26 +01:00
John Wellbelove
4a9f70cd0c Renamed mem_type to mem_cast 2021-06-22 14:18:02 +01:00
John Wellbelove
c5fba8fd45 Added experimental uni_type 2021-06-22 14:17:10 +01:00
John Wellbelove
2ef35caa77 Added experimental uni_type 2021-06-22 14:16:49 +01:00
John Wellbelove
36db54dd67 Updated version numbers 2021-06-22 14:13:20 +01:00
John Wellbelove
622eaa4434 Fixed copy and move assignment bug 2021-06-22 14:13:20 +01:00
John Wellbelove
f0f0500c94 Define missing macro when cross compiling with clang 2021-06-22 14:13:19 +01:00
John Wellbelove
5dd5bc3aac Define missing macro when cross compiling with clang 2021-06-22 14:13:19 +01:00
T
32d80e91e7 Add support to cross-compile with clang (#389)
Clang does not define __WCHAR_MIN__ however, limits.h relies on it.
By using the __AVR__ macro we can define __WCHAR_MIN__ only when
cross-compiling with clang.
2021-06-22 14:13:19 +01:00
John Wellbelove
b1f771f6b4 Updated version numbers 2021-06-22 12:04:28 +01:00
John Wellbelove
60b04b55f6 Fixed copy and move assignment bug 2021-06-22 11:00:42 +01:00
John Wellbelove
e090f1a18c Define missing macro when cross compiling with clang 2021-06-18 14:38:12 +01:00
John Wellbelove
1a4e58d028 Define missing macro when cross compiling with clang 2021-06-18 14:15:44 +01:00
T
a32fa10329
Add support to cross-compile with clang (#389)
Clang does not define __WCHAR_MIN__ however, limits.h relies on it.
By using the __AVR__ macro we can define __WCHAR_MIN__ only when
cross-compiling with clang.
2021-06-18 12:52:34 +01:00
John Wellbelove
2e0c2a4099 Merge branch 'master' into feature/variadic-variant 2021-06-17 13:45:57 +01:00
John Wellbelove
6a1ce235dc etl::basic_string::copy is now const and does not affect the 'truncated' flag. 2021-06-17 13:02:59 +01:00
John Wellbelove
e44efd75a7 etl::basic_string::copy is now const and does not affect the 'truncated' flag. 2021-06-17 12:01:04 +01:00
John Wellbelove
afabc049b7 Merge branch 'master' into feature/variadic-variant
# Conflicts:
#	include/etl/mem_cast.h
#	test/test_mem_cast.cpp
#	test/test_mem_cast_ptr.cpp
#	test/vs2019/etl.vcxproj
#	test/vs2019/etl.vcxproj.filters
2021-06-14 18:24:59 +01:00
John Wellbelove
6f0b0a9809 Updated version numbers 2021-06-14 14:31:55 +01:00
John Wellbelove
892529b0f2 Merge branch 'feature/mem_cast' into development 2021-06-14 14:20:38 +01:00
John Wellbelove
1781be7702 Fixed ambiguous function call for clang 2021-06-14 13:23:41 +01:00
John Wellbelove
e4e61cfe69 Fixed ambiguous function call for clang 2021-06-14 13:11:03 +01:00
John Wellbelove
0a7a131a43 Updated version numbers 2021-06-12 11:48:27 +01:00
John Wellbelove
fb54f23e5d Latest updates 2021-06-12 11:43:32 +01:00
Jonathan
7212856424 Change debounce state tables to be defined as constant. (#386)
Currently these state tables are being defined in the data section of RAM. As these tables are unchanged, this change allows them to be placed in the text section instead. As they are function local objects, they also get lazy initialized causing references to the dynamic shared object which are unnecessary.
2021-06-10 10:13:06 +01:00
John Wellbelove
2b2a542aa1 Added more static asserts for alignment 2021-06-03 20:45:36 +01:00
John Wellbelove
a2aa6b26c3 Changed comments 2021-06-03 11:44:38 +01:00