Skip to content

Commit 171ad02

Browse files
committed
Delete redudant flag
Delete ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED since it was always being evaluated to if Cpp11 was supported.
1 parent 9482273 commit 171ad02

23 files changed

+11
-76
lines changed

include/etl/deque.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ namespace etl
17581758
void push_back(const_reference item)
17591759
{
17601760
ETL_ASSERT_CHECK_PUSH_POP_OR_RETURN(!full(), ETL_ERROR(deque_full));
1761-
1761+
17621762
create_element_back(item);
17631763
}
17641764

@@ -1771,7 +1771,7 @@ namespace etl
17711771
void push_back(rvalue_reference item)
17721772
{
17731773
ETL_ASSERT_CHECK_PUSH_POP_OR_RETURN(!full(), ETL_ERROR(deque_full));
1774-
1774+
17751775
create_element_back(etl::move(item));
17761776
}
17771777
#endif
@@ -2484,9 +2484,7 @@ namespace etl
24842484
void repair()
24852485
#endif
24862486
{
2487-
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
24882487
ETL_ASSERT(etl::is_trivially_copyable<T>::value, ETL_ERROR(etl::deque_incompatible_type));
2489-
#endif
24902488

24912489
etl::ideque<T>::repair_buffer(reinterpret_cast<T*>(buffer.raw));
24922490
}

include/etl/generators/type_traits_generator.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,53 +1789,28 @@ typedef integral_constant<bool, true> true_type;
17891789

17901790
//*********************************************
17911791
// is_trivially_constructible
1792-
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
17931792
template <typename T>
17941793
using is_trivially_constructible = std::is_trivially_constructible<T>;
1795-
#else
1796-
template <typename T>
1797-
using is_trivially_constructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
1798-
#endif
17991794

18001795
//*********************************************
18011796
// is_trivially_copy_constructible
1802-
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
18031797
template <typename T>
18041798
using is_trivially_copy_constructible = std::is_trivially_copy_constructible<T>;
1805-
#else
1806-
template <typename T>
1807-
using is_trivially_copy_constructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
1808-
#endif
18091799

18101800
//*********************************************
18111801
// is_trivially_destructible
1812-
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
18131802
template <typename T>
18141803
using is_trivially_destructible = std::is_trivially_destructible<T>;
1815-
#else
1816-
template <typename T>
1817-
using is_trivially_destructible = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
1818-
#endif
18191804

18201805
//*********************************************
18211806
// is_trivially_copy_assignable
1822-
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
18231807
template <typename T>
18241808
using is_trivially_copy_assignable = std::is_trivially_copy_assignable<T>;
1825-
#else
1826-
template <typename T>
1827-
using is_trivially_copy_assignable = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
1828-
#endif
18291809

18301810
//*********************************************
18311811
// is_trivially_copyable
1832-
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
18331812
template <typename T>
18341813
using is_trivially_copyable = std::is_trivially_copyable<T>;
1835-
#else
1836-
template <typename T>
1837-
using is_trivially_copyable = etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>;
1838-
#endif
18391814

18401815
#elif defined(ETL_USER_DEFINED_TYPE_TRAITS)
18411816

include/etl/profiles/arduino_arm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,5 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT 1
4545
#define ETL_NO_LARGE_CHAR_SUPPORT 1
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
4746

4847
#endif

include/etl/profiles/armv5.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,5 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT (__cplusplus < 201103L)
4545
#define ETL_NO_LARGE_CHAR_SUPPORT (__cplusplus < 201103L)
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
4746

4847
#endif

include/etl/profiles/armv5_no_stl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT (__cplusplus < 201103L)
4545
#define ETL_NO_LARGE_CHAR_SUPPORT (__cplusplus < 201103L)
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
4746
#define ETL_NO_STL
4847

4948
#endif

include/etl/profiles/armv6.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,5 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT 0
4545
#define ETL_NO_LARGE_CHAR_SUPPORT 0
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
4746

4847
#endif

include/etl/profiles/armv6_no_stl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT 0
4545
#define ETL_NO_LARGE_CHAR_SUPPORT 0
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
4746
#define ETL_NO_STL
4847

4948
#endif

include/etl/profiles/armv7.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,5 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT 0
4545
#define ETL_NO_LARGE_CHAR_SUPPORT 0
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
4746

4847
#endif

include/etl/profiles/armv7_no_stl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT 0
4545
#define ETL_NO_LARGE_CHAR_SUPPORT 0
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 1
4746
#define ETL_NO_STL
4847

4948
#endif

include/etl/profiles/cpp03.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,5 @@ SOFTWARE.
4343
#define ETL_CPP17_SUPPORTED 0
4444
#define ETL_NO_NULLPTR_SUPPORT 1
4545
#define ETL_NO_LARGE_CHAR_SUPPORT 1
46-
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
4746

4847
#endif

0 commit comments

Comments
 (0)