diff --git a/include/etl/deque.h b/include/etl/deque.h index 44043cdc..09714729 100644 --- a/include/etl/deque.h +++ b/include/etl/deque.h @@ -1758,7 +1758,7 @@ namespace etl void push_back(const_reference item) { ETL_ASSERT_CHECK_PUSH_POP_OR_RETURN(!full(), ETL_ERROR(deque_full)); - + create_element_back(item); } @@ -1771,7 +1771,7 @@ namespace etl void push_back(rvalue_reference item) { ETL_ASSERT_CHECK_PUSH_POP_OR_RETURN(!full(), ETL_ERROR(deque_full)); - + create_element_back(etl::move(item)); } #endif @@ -2484,9 +2484,7 @@ namespace etl void repair() #endif { -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_ASSERT(etl::is_trivially_copyable::value, ETL_ERROR(etl::deque_incompatible_type)); -#endif etl::ideque::repair_buffer(reinterpret_cast(buffer.raw)); } diff --git a/include/etl/generators/type_traits_generator.h b/include/etl/generators/type_traits_generator.h index eef30bd4..5291506f 100644 --- a/include/etl/generators/type_traits_generator.h +++ b/include/etl/generators/type_traits_generator.h @@ -1789,53 +1789,28 @@ typedef integral_constant true_type; //********************************************* // is_trivially_constructible -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_constructible = std::is_trivially_constructible; -#else - template - using is_trivially_constructible = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_copy_constructible -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_copy_constructible = std::is_trivially_copy_constructible; -#else - template - using is_trivially_copy_constructible = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_destructible -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_destructible = std::is_trivially_destructible; -#else - template - using is_trivially_destructible = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_copy_assignable -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_copy_assignable = std::is_trivially_copy_assignable; -#else - template - using is_trivially_copy_assignable = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_copyable -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_copyable = std::is_trivially_copyable; -#else - template - using is_trivially_copyable = etl::bool_constant::value || etl::is_pointer::value>; -#endif #elif defined(ETL_USER_DEFINED_TYPE_TRAITS) diff --git a/include/etl/profiles/arduino_arm.h b/include/etl/profiles/arduino_arm.h index 626d2ebf..f61cc1e0 100644 --- a/include/etl/profiles/arduino_arm.h +++ b/include/etl/profiles/arduino_arm.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 1 #define ETL_NO_LARGE_CHAR_SUPPORT 1 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #endif diff --git a/include/etl/profiles/armv5.h b/include/etl/profiles/armv5.h index e1811d54..05745792 100644 --- a/include/etl/profiles/armv5.h +++ b/include/etl/profiles/armv5.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT (__cplusplus < 201103L) #define ETL_NO_LARGE_CHAR_SUPPORT (__cplusplus < 201103L) -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #endif diff --git a/include/etl/profiles/armv5_no_stl.h b/include/etl/profiles/armv5_no_stl.h index 97583e3f..6215f1cb 100644 --- a/include/etl/profiles/armv5_no_stl.h +++ b/include/etl/profiles/armv5_no_stl.h @@ -43,7 +43,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT (__cplusplus < 201103L) #define ETL_NO_LARGE_CHAR_SUPPORT (__cplusplus < 201103L) -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #define ETL_NO_STL #endif diff --git a/include/etl/profiles/armv6.h b/include/etl/profiles/armv6.h index 93e9e876..a4d824fe 100644 --- a/include/etl/profiles/armv6.h +++ b/include/etl/profiles/armv6.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1 #endif diff --git a/include/etl/profiles/armv6_no_stl.h b/include/etl/profiles/armv6_no_stl.h index cd0d103d..4fdfc3c4 100644 --- a/include/etl/profiles/armv6_no_stl.h +++ b/include/etl/profiles/armv6_no_stl.h @@ -43,7 +43,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1 #define ETL_NO_STL #endif diff --git a/include/etl/profiles/armv7.h b/include/etl/profiles/armv7.h index 05ff4965..f09f20de 100644 --- a/include/etl/profiles/armv7.h +++ b/include/etl/profiles/armv7.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1 #endif diff --git a/include/etl/profiles/armv7_no_stl.h b/include/etl/profiles/armv7_no_stl.h index 1c177300..8054e85e 100644 --- a/include/etl/profiles/armv7_no_stl.h +++ b/include/etl/profiles/armv7_no_stl.h @@ -43,7 +43,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1 #define ETL_NO_STL #endif diff --git a/include/etl/profiles/cpp03.h b/include/etl/profiles/cpp03.h index 57e8c635..781c498b 100644 --- a/include/etl/profiles/cpp03.h +++ b/include/etl/profiles/cpp03.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 1 #define ETL_NO_LARGE_CHAR_SUPPORT 1 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #endif diff --git a/include/etl/profiles/cpp03_no_stl.h b/include/etl/profiles/cpp03_no_stl.h index fba6a267..8ff7533c 100644 --- a/include/etl/profiles/cpp03_no_stl.h +++ b/include/etl/profiles/cpp03_no_stl.h @@ -43,7 +43,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 1 #define ETL_NO_LARGE_CHAR_SUPPORT 1 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #define ETL_NO_STL #endif diff --git a/include/etl/profiles/cpp11.h b/include/etl/profiles/cpp11.h index ad17f37b..47bae761 100644 --- a/include/etl/profiles/cpp11.h +++ b/include/etl/profiles/cpp11.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1 #endif diff --git a/include/etl/profiles/cpp11_no_stl.h b/include/etl/profiles/cpp11_no_stl.h index 5482cff9..319249ff 100644 --- a/include/etl/profiles/cpp11_no_stl.h +++ b/include/etl/profiles/cpp11_no_stl.h @@ -43,7 +43,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #define ETL_NO_STL #endif diff --git a/include/etl/profiles/cpp14.h b/include/etl/profiles/cpp14.h index 4c2e3d2d..c743b6f2 100644 --- a/include/etl/profiles/cpp14.h +++ b/include/etl/profiles/cpp14.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1 #endif diff --git a/include/etl/profiles/cpp14_no_stl.h b/include/etl/profiles/cpp14_no_stl.h index 4e08450e..7c688509 100644 --- a/include/etl/profiles/cpp14_no_stl.h +++ b/include/etl/profiles/cpp14_no_stl.h @@ -43,7 +43,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #define ETL_NO_STL #endif diff --git a/include/etl/profiles/cpp17.h b/include/etl/profiles/cpp17.h index 69aed509..4ad6d89b 100644 --- a/include/etl/profiles/cpp17.h +++ b/include/etl/profiles/cpp17.h @@ -43,6 +43,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 1 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1 #endif diff --git a/include/etl/profiles/cpp17_no_stl.h b/include/etl/profiles/cpp17_no_stl.h index 5bac2b39..5d098ba4 100644 --- a/include/etl/profiles/cpp17_no_stl.h +++ b/include/etl/profiles/cpp17_no_stl.h @@ -43,7 +43,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 1 #define ETL_NO_NULLPTR_SUPPORT 0 #define ETL_NO_LARGE_CHAR_SUPPORT 0 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #define ETL_NO_STL #endif diff --git a/include/etl/profiles/determine_builtin_support.h b/include/etl/profiles/determine_builtin_support.h index 82bf4dae..bde5e110 100644 --- a/include/etl/profiles/determine_builtin_support.h +++ b/include/etl/profiles/determine_builtin_support.h @@ -48,6 +48,10 @@ SOFTWARE. #define ETL_USING_BUILTIN_IS_TRIVIALLY_DESTRUCTIBLE 1 #endif + #if !defined(ETL_USING_BUILTIN_IS_TRIVIALLY_ASSIGNABLE) + #define ETL_USING_BUILTIN_IS_TRIVIALLY_ASSIGNABLE 1 + #endif + #if !defined(ETL_USING_BUILTIN_IS_TRIVIALLY_COPYABLE) #define ETL_USING_BUILTIN_IS_TRIVIALLY_COPYABLE 1 #endif @@ -152,6 +156,10 @@ SOFTWARE. #define ETL_USING_BUILTIN_IS_TRIVIALLY_DESTRUCTIBLE 0 #endif +#if !defined(ETL_USING_BUILTIN_IS_TRIVIALLY_ASSIGNABLE) + #define ETL_USING_BUILTIN_IS_TRIVIALLY_ASSIGNABLE 0 +#endif + #if !defined(ETL_USING_BUILTIN_IS_TRIVIALLY_COPYABLE) #define ETL_USING_BUILTIN_IS_TRIVIALLY_COPYABLE 0 #endif @@ -194,6 +202,7 @@ namespace etl static ETL_CONSTANT bool using_builtin_is_constructible = (ETL_USING_BUILTIN_IS_CONSTRUCTIBLE == 1); static ETL_CONSTANT bool using_builtin_is_trivially_constructible = (ETL_USING_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE == 1); static ETL_CONSTANT bool using_builtin_is_trivially_destructible = (ETL_USING_BUILTIN_IS_TRIVIALLY_DESTRUCTIBLE == 1); + static ETL_CONSTANT bool using_builtin_is_trivially_assignable = (ETL_USING_BUILTIN_IS_TRIVIALLY_ASSIGNABLE == 1); static ETL_CONSTANT bool using_builtin_is_trivially_copyable = (ETL_USING_BUILTIN_IS_TRIVIALLY_COPYABLE == 1); static ETL_CONSTANT bool using_builtin_underlying_type = (ETL_USING_BUILTIN_UNDERLYING_TYPE == 1); static ETL_CONSTANT bool using_builtin_is_constant_evaluated = (ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED == 1); diff --git a/include/etl/profiles/determine_compiler_language_support.h b/include/etl/profiles/determine_compiler_language_support.h index 322cee87..9b24090a 100644 --- a/include/etl/profiles/determine_compiler_language_support.h +++ b/include/etl/profiles/determine_compiler_language_support.h @@ -192,10 +192,6 @@ SOFTWARE. #define ETL_NO_LARGE_CHAR_SUPPORT ETL_NOT_USING_CPP11 #endif -#if !defined(ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED) - #define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_USING_CPP11 -#endif - // Language standard #if !defined(ETL_LANGUAGE_STANDARD) #if ETL_USING_CPP23 diff --git a/include/etl/profiles/segger_gcc_stlport.h b/include/etl/profiles/segger_gcc_stlport.h index 74fc10d8..7e5833b6 100644 --- a/include/etl/profiles/segger_gcc_stlport.h +++ b/include/etl/profiles/segger_gcc_stlport.h @@ -48,7 +48,6 @@ SOFTWARE. #endif #define ETL_NO_NULLPTR_SUPPORT 1 #define ETL_NO_LARGE_CHAR_SUPPORT ETL_CPP11_NOT_SUPPORTED -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #define ETL_STLPORT 1 #endif diff --git a/include/etl/profiles/ticc.h b/include/etl/profiles/ticc.h index 50aa6446..8cf0ff40 100644 --- a/include/etl/profiles/ticc.h +++ b/include/etl/profiles/ticc.h @@ -42,6 +42,5 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 1 #define ETL_NO_LARGE_CHAR_SUPPORT 1 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #endif diff --git a/include/etl/profiles/ticc_no_stl.h b/include/etl/profiles/ticc_no_stl.h index e0b2c20c..e0c50248 100644 --- a/include/etl/profiles/ticc_no_stl.h +++ b/include/etl/profiles/ticc_no_stl.h @@ -42,7 +42,6 @@ SOFTWARE. #define ETL_CPP17_SUPPORTED 0 #define ETL_NO_NULLPTR_SUPPORT 1 #define ETL_NO_LARGE_CHAR_SUPPORT 1 -#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0 #define ETL_NO_STL #endif diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index de030470..f95c8c12 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -1782,53 +1782,28 @@ typedef integral_constant true_type; //********************************************* // is_trivially_constructible -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_constructible = std::is_trivially_constructible; -#else - template - using is_trivially_constructible = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_copy_constructible -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_copy_constructible = std::is_trivially_copy_constructible; -#else - template - using is_trivially_copy_constructible = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_destructible -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_destructible = std::is_trivially_destructible; -#else - template - using is_trivially_destructible = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_copy_assignable -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_copy_assignable = std::is_trivially_copy_assignable; -#else - template - using is_trivially_copy_assignable = etl::bool_constant::value || etl::is_pointer::value>; -#endif //********************************************* // is_trivially_copyable -#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED template using is_trivially_copyable = std::is_trivially_copyable; -#else - template - using is_trivially_copyable = etl::bool_constant::value || etl::is_pointer::value>; -#endif #elif defined(ETL_USER_DEFINED_TYPE_TRAITS)