34 Commits

Author SHA1 Message Date
John Wellbelove
aeb8e4f734 Formatted source files 2026-04-02 14:11:45 +01:00
Roland Reichwein
e439963258
Fix etl::variant get() for ambiguous types (#1304)
When a type occured multiple times in a variant, comparison operator
asserted before.

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-02-25 09:42:56 +00:00
John Wellbelove
69b741adb8 Add type_list functionality to etl::variant using etl::variant_from_type_list 2026-01-28 17:22:37 +00:00
John Wellbelove
61796bee8f Added etl::type_list to etl::variant 2026-01-25 11:10:38 +01:00
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
John Wellbelove
24824d2095 Added ETL_USING_LEGACY_VARIANT & ETL_NOT_USING_LEGACY_VARIANT
Added some legacy API member functions to new variant type.
2024-07-28 16:47:12 +01:00
John Wellbelove
76699fb27c Revert change #804 to restore value initialisation of type0 for default constructor 2024-04-26 17:48:22 +01:00
John Wellbelove
ea9d5b0962 Changes for OSX + C++20 + STL compatibility 2024-04-16 09:02:59 +01:00
John Wellbelove
676b5f330a Modified tests for <=> operator 2024-04-16 08:06:01 +01:00
John Wellbelove
02a11e943e Moved include for clang compatibility 2024-04-02 17:12:19 +01:00
John Wellbelove
3696fa4239 Added more comparison tests 2024-04-01 17:13:45 +01:00
John Wellbelove
39205e719d Added comparison operators 2024-03-29 16:35:45 +00:00
John Wellbelove
f1d80ba577 Work in progree 2024-03-23 20:32:26 +00:00
Manuel Seeböck
134f8e4209
variant varadic default constructed state (#804)
* fixed variant varadic default constructed state

* updated testcases to account for default contructor changes
2024-02-22 19:14:37 +00:00
John Wellbelove
63d1a64e6c #787 etl::expected doesn't compile with ETL_LOG_ERRORS
Updated CI scripts
#786 u8string
#783 Cannot insert existing value to full set
#781 etl::multi_span::iterator::operator *() fails if first span is empty
#780 endian enum_type produces useless-cast warnings
#779 hash.h: warnings produced with -Wfloat-equal
2023-11-24 09:59:35 +00:00
John Wellbelove
177299977d Refactored visitor and variant to allow const variants and fix passing references to visitors 2023-07-04 11:41:00 +01:00
John Wellbelove
e9a5f4bc10 Merge branch 'development' of https://github.com/ETLCPP/etl into development
# Conflicts:
#	include/etl/private/variant_variadic.h
#	test/test_variant_variadic.cpp
2023-05-16 10:24:41 +01:00
John Wellbelove
7e1a59d939 etl::variant updates and refactor 2023-05-16 10:16:53 +01:00
John Wellbelove
b7a1b65276 Added const overloads of accept_visitor & accept_functor.
Marked all overloads od accept_visitor & accept_functor as deprecated.
Added new universal accept member function.
2023-05-15 17:22:07 +01:00
John Wellbelove
e127ef73f5 Added const overloads of accept_visitor & accept_functor.
Marked all overloads od accept_visitor & accept_functor as deprecated.
Added new universal accept member function.
2023-05-15 17:03:03 +01:00
John Wellbelove
868b3f31f9 #695 Visiting a const variant (variadic) 2023-05-13 20:58:48 +01:00
John Wellbelove
363a3e2dab Fix test array sizes
C++14 compiler compatibility

Updated test run scripts

Changed some ETL_ASSERT macros to ETL_ASSERT_OR_RETURN

Changed unit test macros for C++20 compaibility

Updated test run scripts

Updated CMake files to allow C++ standard selection

Replaced ETL_ASSERT_AND_RETURN with ETL_ASSERT_OR_RETURN

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

Changed native char8_t check

Added optional optimisation argument to bash script
2023-04-02 11:06:43 +01:00
John Wellbelove
3c6c1ed527 Work in progress 2023-04-02 11:06:42 +01:00
John Wellbelove
e255b34ecd Added emplace by index to variant (variadic) 2023-01-19 09:57:03 +00:00
John Wellbelove
cd18cc6af0 Eradicated all GCC and clang warnings 2022-07-27 10:42:03 +01:00
John Wellbelove
314cb452f7 Merge branch 'feature/variant-visit' into development
# Conflicts:
#	include/etl/private/variant_legacy.h
#	include/etl/private/variant_variadic.h
#	test/vs2019/etl.vcxproj.filters
2022-06-14 11:47:30 +01:00
John Wellbelove
c6e31f381f Added tests 2022-06-14 09:54:17 +01:00
John Wellbelove
baa47d1c33 Updated copyright notice 2022-06-10 21:45:37 +01:00
John Wellbelove
dd89f1c748 Interim changes after PR 2022-06-10 11:18:48 +01:00
Robin Söderholm
89be7e62cf
Feature/variant visit (#552)
* add variant visit to c++11 and above

* visit legacy added

* update with multiple variants visit for variadic
2022-06-09 08:56:55 +01:00
John Wellbelove
36d126c93e Squashed commit of the following:
commit c217b3ec12b26104e8f1027c1766cc9d49b93a29
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Thu Apr 21 11:57:55 2022 +0200

    Added mutex traits

    Added transparent comparator test to multimap

commit b6487b869e5599ea067d45af1778d5c0f90c6a52
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Thu Apr 21 10:42:06 2022 +0200

    Modified char8_t, char16_t and char32_t macros.

    Added conditional compilation on the presense of native char8_t, char16_t and char32_t types.

commit 2c2bd86ce3d5d5d698e922518421a93f70a9cc1e
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Thu Apr 21 10:29:04 2022 +0200

    Modified char8_t, char16_t and char32_t macros.

    Added conditional compilation on the presense of native char8_t, char16_t and char32_t types.

commit d16242d20e9b6df6752a926d862d0016a452bada
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:53:37 2022 +0200

    Expanded constexpr test

commit fad097e6656cd4639c2d81bc8cad2467cae4b4ce
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:53:05 2022 +0200

    Added ETL_OVERRIDE to state chart process_event()

commit 25403c2225f3aff0b99105a54cfc44f1cf88d527
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:41:00 2022 +0200

    Added test_etl_traits

commit e42c778cf645cb8fc06e5930336e7f1183004dfe
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Wed Apr 20 13:38:22 2022 +0200

    Removed unused code.

commit 5a25c0c1973f7094ef3aa5b6f29529e96450451c
Author: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Date:   Sun Apr 17 13:17:29 2022 +0200

    Large and small character support macros

commit 6a463fb65ef655b700a8dea381265a3c1b622658
Author: Melg Eight <public.melg8@gmail.com>
Date:   Sun Apr 17 13:54:34 2022 +0300

    Fix spelling (#535)

    Signed-off-by: Melg Eight <public.melg8@gmail.com>

commit 5468eb659c8b4ecdb3d08e8b8f0442c5a2549a48
Author: Gabriel Arjones <arjones@arjones.com>
Date:   Thu Apr 14 17:55:27 2022 -0300

    cmake: write an arch independent version file (#534)
2022-04-21 12:11:26 +02:00
John Wellbelove
dc34be793e Added missing explicit initialisation from in_place structures. 2021-10-12 14:51:39 +01:00
John Wellbelove
c691991538 Removed warning from compilation 2021-10-01 18:41:35 +01:00
John Wellbelove
031b3e7eda Changed variant files names 2021-07-29 14:15:49 +01:00