etl/test/etl_profile.h
mike919192 3295cb30ca
etl array checks (#1188)
* 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>

* Fix etl::typed_storage by supporting omitted destructors (#1182)

* 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

* Fix etl::typed_storage by supporting omitted destructors

In a recent change to alignment.h, the etl::typed_storage was
changed in a way that in case of an already constructed object,
the object is created via assignment.

However, this contradicts the original use case that led to
etl::typed_storage in the first place:
https://github.com/ETLCPP/etl/pull/1023

The goal is to omit destructors (and at the same time support
classes with deleted assignment operators), so they can be optimized out
at link time.

This change reverts commit ac7b268 to restore the original
functionality and changes the test to reflect the original
use case.

* Fix missing create() in non-C++11 typed_storage_ext constructor

* Typo fix

---------

Co-authored-by: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Co-authored-by: Drew Rife <darife@jlg.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>

* removed navis file from project

* Updated version and release notes

* Removed forced unsigned int cast in type_def bit-shift operators (#1178)

* Removed UB in type_def bit-shift operators

* Changed shift operators to allow both signed and unsigned operands for shifts
This allows the library user to explicitly use unsigned values to avoid UB

* Fixed constexpr errors for CPP11

* Changed is_arithmetic checks to use is_integral since valid shifts require integral operands

* Removed need for CPP11 since changes are CPP03 compatible

* Delete project navis files

* Add force CI check on piull requests

* Removed ETL_NOEXCEPT from delegate operator(), call_if(), and call_or()

Removed ETL_NOEXCEPT from closureoperator(), call_if(), and call_or()

* Updated version and release notes

* Updated version and release notes

* Remove noexcept from delegate method stubs. (#1185)

In addition to removing noexcept from call_if, this is also needed to prevent
an abort when cancelling a pthread that is executing a delegate.

* Updated version and release notes

* Re architect the extra checks

* Add CHECK_EXTRA

* Fix newline at end of file

* The check index macro also needs to be defined to throw

* Remove ETL_VERBOSE_ERRORS macros

---------

Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <john.wellbelove@asterconsulting.co.uk>
Co-authored-by: Drew Rife <darife@jlg.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: David Ockey <2897027+ockeydockey@users.noreply.github.com>
Co-authored-by: Marco Nilsson <marco@zyax.se>
2025-09-23 16:26:19 +01:00

148 lines
5.4 KiB
C

///\file
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
https://www.etlcpp.com
Copyright(c) 2017 John Wellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef ETL_PROFILE_H_INCLUDED
#define ETL_PROFILE_H_INCLUDED
#define ETL_THROW_EXCEPTIONS
#define ETL_DEBUG_THROW_EXCEPTIONS
#define ETL_VERBOSE_ERRORS
#define ETL_CHECK_PUSH_POP
#define ETL_CHECK_INDEX_OPERATOR
#define ETL_CHECK_EXTRA
#define ETL_ISTRING_REPAIR_ENABLE
#define ETL_IVECTOR_REPAIR_ENABLE
#define ETL_IDEQUE_REPAIR_ENABLE
#define ETL_ICIRCULAR_BUFFER_REPAIR_ENABLE
#define ETL_IN_UNIT_TEST
#define ETL_DEBUG_COUNT
#define ETL_ARRAY_VIEW_IS_MUTABLE
#define ETL_MESSAGE_TIMER_USE_ATOMIC_LOCK
#define ETL_CALLBACK_TIMER_USE_ATOMIC_LOCK
#define ETL_POLYMORPHIC_RANDOM
#define ETL_POLYMORPHIC_BITSET
#define ETL_POLYMORPHIC_DEQUE
#define ETL_POLYMORPHIC_FLAT_MAP
#define ETL_POLYMORPHIC_FLAT_MULTIMAP
#define ETL_POLYMORPHIC_FLAT_SET
#define ETL_POLYMORPHIC_FLAT_MULTISET
#define ETL_POLYMORPHIC_FORWARD_LIST
#define ETL_POLYMORPHIC_LIST
#define ETL_POLYMORPHIC_MAP
#define ETL_POLYMORPHIC_MULTIMAP
#define ETL_POLYMORPHIC_SET
#define ETL_POLYMORPHIC_MULTISET
#define ETL_POLYMORPHIC_QUEUE
#define ETL_POLYMORPHIC_STACK
#define ETL_POLYMORPHIC_REFERENCE_FLAT_MAP
#define ETL_POLYMORPHIC_REFERENCE_FLAT_MULTIMAP
#define ETL_POLYMORPHIC_REFERENCE_FLAT_SET
#define ETL_POLYMORPHIC_REFERENCE_FLAT_MULTISET
#define ETL_POLYMORPHIC_UNORDERED_MAP
#define ETL_POLYMORPHIC_UNORDERED_MULTIMAP
#define ETL_POLYMORPHIC_UNORDERED_SET
#define ETL_POLYMORPHIC_UNORDERED_MULTISET
#define ETL_POLYMORPHIC_STRINGS
#define ETL_POLYMORPHIC_POOL
#define ETL_POLYMORPHIC_VECTOR
#define ETL_POLYMORPHIC_INDIRECT_VECTOR
#if defined(ETL_FORCE_TEST_CPP03_IMPLEMENTATION)
#define ETL_FUNCTION_FORCE_CPP03_IMPLEMENTATION
#define ETL_PRIORITY_QUEUE_FORCE_CPP03_IMPLEMENTATION
#define ETL_QUEUE_ATOMIC_FORCE_CPP03_IMPLEMENTATION
#define ETL_VARIANT_FORCE_CPP03_IMPLEMENTATION
#define ETL_VECTOR_FORCE_CPP03_IMPLEMENTATION
#define ETL_QUEUE_FORCE_CPP03_IMPLEMENTATION
#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03_IMPLEMENTATION
#define ETL_QUEUE_ISR_FORCE_CPP03_IMPLEMENTATION
#define ETL_QUEUE_LOCKED_FORCE_CPP03_IMPLEMENTATION
#define ETL_OPTIONAL_FORCE_CPP03_IMPLEMENTATION
#define ETL_LARGEST_TYPE_FORCE_CPP03_IMPLEMENTATION
#define ETL_TYPE_SELECT_FORCE_CPP03_IMPLEMENTATION
#define ETL_UNINITIALIZED_BUFFER_FORCE_CPP03_IMPLEMENTATION
#define ETL_CRC_FORCE_CPP03_IMPLEMENTATION
#define ETL_MEM_CAST_FORCE_CPP03_IMPLEMENTATION
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
#define ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION
#define ETL_OBSERVER_FORCE_CPP03_IMPLEMENTATION
#define ETL_MESSAGE_ROUTER_FORCE_CPP03_IMPLEMENTATION
#define ETL_FSM_FORCE_CPP03_IMPLEMENTATION
//#define ETL_DELEGATE_FORCE_CPP03_IMPLEMENTATION // C++03 implementation is tested at the same time as the C++11 and above.
#define ETL_CLOSURE_FORCE_CPP03_IMPLEMENTATION
#define ETL_SINGLETON_FORCE_CPP03_IMPLEMENTATION
#define ETL_BYTE_FORCE_CPP03_IMPLEMENTATION
#define ETL_LIST_FORCE_CPP03_IMPLEMENTATION
#define ETL_FORWARD_LIST_FORCE_CPP03_IMPLEMENTATION
#define ETL_FLAT_SET_FORCE_CPP03_IMPLEMENTATION
#define ETL_FLAT_MULTISET_FORCE_CPP03_IMPLEMENTATION
#define ETL_VARIANT_POOL_FORCE_CPP03_IMPLEMENTATION
#endif
#if defined(ETL_FORCE_TEST_CPP11)
#define ETL_OVERLOAD_FORCE_CPP11
#define ETL_VARIANT_FORCE_CPP11
#endif
#include "../include/etl/profiles/determine_compiler_language_support.h"
#include "../include/etl/profiles/determine_compiler_version.h"
#include "../include/etl/profiles/determine_development_os.h"
#if defined(ETL_COMPILER_GCC)
#if (ETL_COMPILER_VERSION < 8)
#define ETL_TEMPLATE_DEDUCTION_GUIDE_TESTS_DISABLED
#endif
#endif
#define ETL_CHRONO_SYSTEM_CLOCK_DURATION etl::chrono::milliseconds
#define ETL_CHRONO_HIGH_RESOLUTION_CLOCK_DURATION etl::chrono::nanoseconds
#define ETL_CHRONO_STEADY_CLOCK_DURATION etl::chrono::seconds
#define ETL_CHRONO_SYSTEM_CLOCK_IS_STEADY false
#define ETL_USE_VERBOSE_CHRONO_LITERALS
#if defined(ETL_DEVELOPMENT_OS_WINDOWS)
#define ETL_TARGET_OS_WINDOWS
#elif defined(ETL_DEVELOPMENT_OS_LINUX)
#define ETL_TARGET_OS_LINUX
#else
#define ETL_TARGET_OS_GENERIC
#endif
#if !((ETL_CPP20_SUPPORTED && !defined(ETL_NO_STL)) || defined(__BYTE_ORDER__))
#define ETL_ENDIAN_NATIVE 0
#endif
#endif