mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-15 08:26:04 +08:00
Delete redudant flag
Delete ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED since it was always being evaluated to if Cpp11 was supported.
This commit is contained in:
parent
94822732a2
commit
171ad026f6
@ -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<T>::value, ETL_ERROR(etl::deque_incompatible_type));
|
||||
#endif
|
||||
|
||||
etl::ideque<T>::repair_buffer(reinterpret_cast<T*>(buffer.raw));
|
||||
}
|
||||
|
||||
@ -1789,53 +1789,28 @@ typedef integral_constant<bool, true> true_type;
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_constructible
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_constructible = std::is_trivially_constructible<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_constructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_copy_constructible
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_copy_constructible = std::is_trivially_copy_constructible<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_copy_constructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_destructible
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_destructible = std::is_trivially_destructible<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_destructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_copy_assignable
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_copy_assignable = std::is_trivially_copy_assignable<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_copy_assignable = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_copyable
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_copyable = std::is_trivially_copyable<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_copyable = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
#elif defined(ETL_USER_DEFINED_TYPE_TRAITS)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1782,53 +1782,28 @@ typedef integral_constant<bool, true> true_type;
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_constructible
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_constructible = std::is_trivially_constructible<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_constructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_copy_constructible
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_copy_constructible = std::is_trivially_copy_constructible<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_copy_constructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_destructible
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_destructible = std::is_trivially_destructible<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_destructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_copy_assignable
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_copy_assignable = std::is_trivially_copy_assignable<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_copy_assignable = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
//*********************************************
|
||||
// is_trivially_copyable
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
template <typename T>
|
||||
using is_trivially_copyable = std::is_trivially_copyable<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using is_trivially_copyable = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
|
||||
#endif
|
||||
|
||||
#elif defined(ETL_USER_DEFINED_TYPE_TRAITS)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user