51 Commits

Author SHA1 Message Date
Nik Delgado
af8ec168c4 implement .begin() and .end() for etl::optional (#1246)
Co-authored-by: nikdelgado <nikdelgado@icloud.com>
2025-12-26 07:25:33 +00:00
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
Helder Duarte
78f04ad298
Fix value_or not taking const in optional (#1225) 2025-11-27 08:48:27 +00:00
Roland Reichwein
75606fc079
Regression fix: Support zero arguments emplace() in etl::optional (#1183)
* Added coderabbitai configuration

* Added builtin mem function tests

* Modified etl::typed_storage

* Modified etl::typed_storage

# Conflicts:
#	include/etl/alignment.h

* Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW

* Added etl::typed_storage_ext and swap for same

* Added etl::typed_storage_ext and swap for same

# Conflicts:
#	include/etl/alignment.h

* Added release notes

* Fixes to GCC -O2 errors

* Changed char* parameters to value_type* parameters

* Fixed compilation issues for const containers unit tests

* Added automatic selection of __builtin_memxxx functions for GCC and clang

* Added enhanced coderabbit configuration

* Updated version and release notes

* Disabled constexpr const container tests for C++11

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Attempted fixes for MacOS compilation

* Updated version and release notes

* feat: removed unreachable break statements (#1169)

* Updated version and release notes

* Modified etl::typed_storage

# Conflicts:
#	include/etl/alignment.h

* Support zero arguments emplace() in etl::optional

For non-fundamental types, a recent change in etl::optional was
introduced that doesn't support zero arguments emplace() anymore.

This change fixes it and adds the respective test.

---------

Co-authored-by: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Co-authored-by: Drew Rife <darife@jlg.com>
2025-09-10 10:37:30 +01:00
John Wellbelove
d27adeb510 #1171 optional of a const arary can't be emplaced with gcc-15 2025-09-06 20:51:11 +01:00
John Wellbelove
0326edef42 Replaced ETL_NOEXCEPT_IF_NO_THROW with ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS) 2025-09-06 20:51:10 +01:00
John Wellbelove
e67066b788 Added emplace type constructors to etl::optional 2025-08-02 13:47:33 +01:00
rolandreichweinbmw
b58ba95e60
Added return to etl::optional emplace, fixed typo (#982) 2024-12-02 12:10:26 +00:00
John Wellbelove
ea74d2f02f etl::optional C++ compatibility updates 2024-02-15 10:50:45 +00:00
John Wellbelove
3cbc73e0c9 Updated unit tests for constexpr optional 2024-02-09 11:04:39 +00:00
John Wellbelove
1a0036366d Added test for #819 2024-01-21 15:41:50 +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
61713b6ce4 Refactored storage for etl::optional 2023-09-24 18:54:24 +01:00
John Wellbelove
53084ae932 Added c++03 zero parameter emplace member functions 2023-08-25 02:05:46 +01:00
John Wellbelove
547184442d Possible fix 2023-08-04 11:58:31 +01:00
John Wellbelove
86b147d2a4 Updated version and release notes 2023-07-10 21:10:07 +01:00
John Wellbelove
3760b26339 Fixed rvalue overloads 2023-07-04 11:46:00 +01:00
John Wellbelove
e034a92412 Changed test order 2023-07-04 11:45:59 +01:00
John Wellbelove
a0af0f9415 Modified the POD specialisation to accept objects that have deleted default constructors 2023-07-04 11:45:09 +01:00
Daniel Jour
96092d841f
optional::operator=(nullopt_t) sets valid to false (#715)
* optional::operator=(nullopt_t) sets valid to false

Fixes https://github.com/ETLCPP/etl/issues/714

* Add test case for #714
2023-06-17 08:19:03 +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
578aea502b Work in progress 2023-04-02 11:06:42 +01: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
8ddf0935d3 Array bounds and maybe-uninitialized warning fixes 2023-02-28 18:33:49 +00:00
Chiraffollo
82c2f8a26d
Fix bug #636 in optional emplace for pod types (#638) 2022-11-23 09:25:24 +00:00
John Wellbelove
54fe9e2554 Fixed incorrect 'valid' flag in assignment operator for arithmetic specialisation 2022-11-16 18:21:46 +01:00
John Wellbelove
1d6886ab6e Disable 'unititialized' warning for classes that use uninitialized buffers 2022-10-19 19:12:37 +01:00
John Wellbelove
cd18cc6af0 Eradicated all GCC and clang warnings 2022-07-27 10:42:03 +01:00
John Wellbelove
baa47d1c33 Updated copyright notice 2022-06-10 21:45:37 +01:00
John Wellbelove
dbfa71944f Abstracted unit test framework header 2021-03-05 13:52:34 +00:00
John Wellbelove
4034574952 make_string_view + fix constexpr in flags.h 2020-11-08 14:35:49 +00:00
John Wellbelove
18d8236f91 Conditionally disable template deduction guide tests 2020-09-29 11:23:10 +01:00
John Wellbelove
509089c0e2 Added template deduction guides 2020-09-28 13:14:12 +01:00
John Wellbelove
e323f2267f Changed http://www.etlcpp.com to https://www.etlcpp.com 2020-05-01 10:22:36 +01:00
mchodzikiewicz
2c1faa1bf9
Add optional::has_value() to fulfill C++17's API (#195) 2020-03-02 12:32:56 +00:00
John Wellbelove
9c94fb3034 Merge remote-tracking branch 'origin/feature/rvalue-references' into development
# Conflicts:
#	include/etl/flat_map.h
#	include/etl/flat_multimap.h
#	include/etl/flat_multiset.h
#	include/etl/flat_set.h
#	include/etl/queue.h
#	include/etl/queue_mpmc_mutex.h
#	include/etl/queue_spsc_atomic.h
#	include/etl/queue_spsc_isr.h
#	include/etl/queue_spsc_locked.h
#	test/test_flat_map.cpp
#	test/test_flat_multimap.cpp
#	test/test_flat_multiset.cpp
#	test/test_flat_set.cpp
2020-02-06 12:06:08 +00:00
John Wellbelove
83347ccfdd Work in progress 2020-01-09 11:15:50 +00:00
John Wellbelove
8f00a1d822 Added 'emplace' to etl::optional.
C++03 & C++11 variants supplied depending on compiler support.
2019-04-17 22:47:39 +01:00
John Wellbelove
bd008350a2 Merge remote-tracking branch 'origin/feature/changed_include_paths' into development
# Conflicts:
#	include/etl/version.h
2018-07-28 21:55:27 +01:00
John Wellbelove
d28c88b1da Added reset() to etl::optional 2018-03-22 06:10:07 +00:00
John Wellbelove
d3493d601d Add full set of operators to etl::optional 2018-02-25 13:21:27 +00:00
John Wellbelove
26b7326d72 Updated Code::Blocks project.
Changed test project include paths to use unittest++ as sub-module.
2017-05-08 20:48:22 +01:00
John Wellbelove
0fb7a0e458 Fixed GCC warnings 2016-12-28 13:11:29 +00:00
John Wellbelove
46eea4caed Added platform.h.
Fixed GCC incompatibilities
2016-03-10 00:41:36 +00:00
John Wellbelove
f1c5c20ba7 Changed folder structure to be compatible with Arduino library specifications 2016-02-28 14:04:22 +00:00
John Wellbelove
16a1978f43 Added link to www.etlcpp.com in licence header. 2015-12-16 11:09:56 +00:00
jwellbelove
86c1023cfd Optional etl::vector does not work under Linux for some reason.
Disabled test for Linux for the time being.
2015-04-05 16:44:22 +01:00
jwellbelove
91728c424e Added 'swap'. Fixed possible uninitialised 'alid' in copy constructor. 2015-04-05 09:37:58 +01:00
jwellbelove
f62819e72b Added tests for debug exceptions. 2015-03-30 21:56:09 +01:00
jwellbelove
17838cffcb Added optional vector tests. 2015-03-28 18:27:54 +00:00