32#error THIS HEADER IS A GENERATOR. DO NOT INCLUDE.
53#ifndef ETL_TYPE_TRAITS_INCLUDED
54#define ETL_TYPE_TRAITS_INCLUDED
58#include "static_assert.h"
68#if ETL_USING_STL && ETL_USING_CPP11
69 #include <type_traits>
75 template <
typename...>
79#if ETL_NOT_USING_STL || ETL_CPP11_NOT_SUPPORTED
87 template <
typename T, T VALUE>
88 struct integral_constant
90 static const T value =
VALUE;
95 operator value_type()
const
105 template <
typename T, T VALUE>
106 const T integral_constant<T, VALUE>::value;
109 template <
typename T, T VALUE>
115 using bool_constant = integral_constant<bool, B>;
128 template <
typename T>
134 template <
typename T>
135 inline constexpr bool negation_v = negation<T>::value;
140 template <
typename T>
struct remove_reference {
typedef T type; };
147 template <
typename T>
153 template <
typename T>
struct remove_pointer {
typedef T type; };
164 template <
typename T>
170 template <
typename T>
struct add_pointer {
typedef typename remove_reference<T>::type* type; };
173 template <
typename T>
179 template <
typename T>
struct is_const :
false_type {};
184 template <
typename T>
190 template <
typename T>
struct remove_const {
typedef T type; };
194 template <
typename T>
200 template <
typename T>
struct add_const {
typedef const T type; };
204 template <
typename T>
215 template <
typename T>
225 template <
typename T>
231 template <
typename T>
struct add_volatile {
typedef volatile T type; };
235 template <
typename T>
247 template <
typename T>
253 template <
typename T>
struct add_cv
259 template <
typename T>
260 using add_cv_t =
typename add_cv<T>::type;
265 template <
typename T>
struct remove_cvref
271 template <
typename T>
277 template <
typename T>
struct is_integral :
false_type {};
291#if ETL_HAS_NATIVE_CHAR8_T
294#if ETL_HAS_NATIVE_CHAR16_T
295 template <>
struct is_integral<char16_t> : true_type {};
297#if ETL_HAS_NATIVE_CHAR32_T
298 template <>
struct is_integral<char32_t> : true_type {};
305 template <
typename T>
313 template <> struct is_signed<wchar_t> : public etl::bool_constant<wchar_t(-1) < wchar_t(0)> {};
314 template <> struct is_signed<signed char> : true_type {};
315 template <> struct is_signed<short> : true_type {};
316 template <> struct is_signed<int> : true_type {};
317 template <> struct is_signed<long> : true_type {};
318 template <> struct is_signed<long long> : true_type {};
319 template <> struct is_signed<float> : true_type {};
320 template <> struct is_signed<double> : true_type {};
321 template <> struct is_signed<long double> : true_type {};
322#if ETL_HAS_NATIVE_CHAR8_T
323 template <> struct is_signed<char8_t> : true_type {};
325#if ETL_HAS_NATIVE_CHAR16_T
326 template <> struct is_signed<char16_t> : true_type {};
328#if ETL_HAS_NATIVE_CHAR32_T
329 template <> struct is_signed<char32_t> : true_type {};
331 template <typename T> struct is_signed<const T> : is_signed<T> {};
332 template <typename T> struct is_signed<volatile T> : is_signed<T> {};
333 template <typename T> struct is_signed<const volatile T> : is_signed<T> {};
336 template <typename T>
337 inline constexpr bool is_signed_v = is_signed<T>::value;
342 template <typename T> struct is_unsigned : false_type {};
343 template <> struct is_unsigned<bool> : true_type {};
344 template <> struct is_unsigned<char> : etl::bool_constant<(char(255) > 0)> {};
345 template <> struct is_unsigned<unsigned char> : true_type {};
346 template <> struct is_unsigned<wchar_t> : public etl::bool_constant<(wchar_t(-1) > wchar_t(0))> {};
348 template <>
struct is_unsigned<
unsigned int> : true_type {};
349 template <>
struct is_unsigned<
unsigned long> : true_type {};
351 template <
typename T>
struct is_unsigned<
const T> : is_unsigned<T> {};
352 template <
typename T>
struct is_unsigned<
volatile T> : is_unsigned<T> {};
353 template <
typename T>
struct is_unsigned<
const volatile T> : is_unsigned<T> {};
356 template <
typename T>
362 template <
typename T>
struct is_floating_point :
false_type {};
363 template <>
struct is_floating_point<
float> : true_type {};
364 template <>
struct is_floating_point<
double> : true_type {};
365 template <>
struct is_floating_point<
long double> : true_type {};
366 template <
typename T>
struct is_floating_point<
const T> : is_floating_point<T> {};
367 template <
typename T>
struct is_floating_point<
volatile T> : is_floating_point<T> {};
368 template <
typename T>
struct is_floating_point<
const volatile T> : is_floating_point<T> {};
371 template <
typename T>
377 template <
typename T1,
typename T2>
struct is_same :
public false_type {};
378 template <
typename T>
struct is_same<
T,
T> :
public true_type {};
381 template <
typename T1,
typename T2>
382 inline constexpr bool is_same_v = is_same<T1, T2>::value;
387 template<
typename T>
struct is_void :
false_type {};
388 template<>
struct is_void<
void> : true_type {};
391 template <
typename T>
392 inline constexpr bool is_void_v = is_void<T>::value;
397 template<
typename T>
struct is_arithmetic :
etl::bool_constant<is_integral<T>::value || is_floating_point<T>::value> {};
400 template <
typename T>
406 template <
typename T>
struct is_fundamental :
etl::bool_constant<is_arithmetic<T>::value || is_void<T>::value> {};
409 template <
typename T>
415 template <
typename T>
struct is_compound :
etl::bool_constant<!is_fundamental<T>::value> {};
418 template <
typename T>
424 template <
typename T>
struct is_array :
false_type {};
425 template <
typename T>
struct is_array<
T[]> : true_type {};
426 template <
typename T,
size_t MAXN>
struct is_array<
T[
MAXN]> : true_type {};
429 template <
typename T>
430 inline constexpr bool is_array_v = is_array<T>::value;
440 template<
typename T>
struct is_pointer :
is_pointer_helper<typename remove_cv<T>::type> {};
443 template <
typename T>
444 inline constexpr bool is_pointer_v = is_pointer<T>::value;
454 template <
typename T>
466 template <
typename T>
474 template<
typename T>
struct is_reference : integral_constant<bool,
475 is_lvalue_reference<T>::value
477 || is_rvalue_reference<T>::value
482 template <
typename T>
489 template <
typename T>
struct is_pod :
etl::bool_constant<etl::is_fundamental<T>::value || etl::is_pointer<T>::value> {};
492 template <
typename T>
498 template <
bool B,
typename T,
typename F>
struct conditional {
typedef T type; };
499 template <
typename T,
typename F>
struct conditional<false,
T,
F> {
typedef F type; };
502 template <
bool B,
typename T,
typename F>
508 template <
typename T>
struct make_signed {
typedef T type; };
509 template <>
struct make_signed<
char> {
typedef signed char type; };
510 template <>
struct make_signed<
unsigned char> {
typedef signed char type; };
512 template <>
struct make_signed<
wchar_t>
518 void>::type>::type type;
521 template <>
struct make_signed<
unsigned short> {
typedef short type; };
522 template <>
struct make_signed<
unsigned int> {
typedef int type; };
523 template <>
struct make_signed<
unsigned long> {
typedef long type; };
524 template <>
struct make_signed<
unsigned long long> {
typedef long long type; };
525 template <
typename T>
struct make_signed<
const T> : add_const<typename make_signed<T>::type> {};
526 template <
typename T>
struct make_signed<
volatile T> : add_volatile<typename make_signed<T>::type> {};
527 template <
typename T>
struct make_signed<
const volatile T> : add_const<typename add_volatile<typename make_signed<T>::type>::type> {};
530 template <
typename T>
536 template <
typename T>
struct make_unsigned {
typedef T type; };
537 template <>
struct make_unsigned<
char> {
typedef unsigned char type; };
538 template <>
struct make_unsigned<
signed char> {
typedef unsigned char type; };
539 template <>
struct make_unsigned<
short> {
typedef unsigned short type; };
541 template <>
struct make_unsigned<
wchar_t>
547 void>::type>::type type;
550 template <>
struct make_unsigned<
int> {
typedef unsigned int type; };
551 template <>
struct make_unsigned<
long> {
typedef unsigned long type; };
552 template <>
struct make_unsigned<
long long> {
typedef unsigned long long type; };
553 template <
typename T>
struct make_unsigned<
const T> : add_const<typename make_unsigned<T>::type> {};
554 template <
typename T>
struct make_unsigned<
volatile T> : add_volatile<typename make_unsigned<T>::type> {};
555 template <
typename T>
struct make_unsigned<
const volatile T> : add_const<typename add_volatile<typename make_unsigned<T>::type>::type> {};
558 template <
typename T>
564 template <
bool B,
typename T =
void>
struct enable_if {};
565 template <
typename T>
struct enable_if<true,
T> {
typedef T type; };
568 template <
bool B,
typename T =
void>
569 using enable_if_t =
typename enable_if<B, T>::type;
574 template <
typename T,
unsigned MAXN = 0U>
575 struct extent : integral_constant<size_t, 0U> {};
577 template <
typename T>
578 struct extent<
T[], 0> : integral_constant<size_t, 0U> {};
580 template <
typename T,
unsigned MAXN>
581 struct extent<
T[],
MAXN> : integral_constant<size_t, extent<T, MAXN - 1>::value> {};
583 template <
typename T,
unsigned MAXN>
584 struct extent<
T[
MAXN], 0> : integral_constant<size_t, MAXN> {};
586 template <
typename T,
unsigned I,
unsigned MAXN>
587 struct extent<
T[
I],
MAXN> : integral_constant<size_t, extent<T, MAXN - 1>::value> {};
590 template <
typename T,
unsigned N = 0U>
591 inline constexpr size_t extent_v = extent<T, N>::value;
596 template <
typename T>
struct remove_extent {
typedef T type; };
597 template <
typename T>
struct remove_extent<
T[]> {
typedef T type; };
598 template <
typename T,
size_t MAXN>
struct remove_extent<
T[
MAXN]> {
typedef T type; };
601 template <
typename T>
607 template <
typename T>
struct remove_all_extents {
typedef T type; };
608 template <
typename T>
struct remove_all_extents<
T[]> {
typedef typename remove_all_extents<T>::type type; };
609 template <
typename T,
size_t MAXN>
struct remove_all_extents<
T[
MAXN]> {
typedef typename remove_all_extents<T>::type type; };
612 template <
typename T>
618 template <
typename T>
struct rank : integral_constant<size_t, 0> {};
619 template <
typename T>
struct rank<
T[]> :
public integral_constant<size_t, rank<T>::value + 1> {};
620 template <
typename T,
size_t MAXN>
struct rank<
T[
MAXN]> :
public integral_constant<size_t, rank<T>::value + 1> {};
623 template <
typename T>
624 inline constexpr size_t rank_v = rank<T>::value;
629 template <
typename T>
632 typedef typename etl::remove_reference<T>::type
U;
635 typename etl::remove_cv<U>::type>::type type;
639 template <
typename T>
640 using decay_t =
typename decay<T>::type;
645 template<
typename TBase,
653 static char check(...) {
return 0; }
661 template<
typename TBase,
typename TDerived>
664 static const bool value =
false;
668 template <
typename T1,
typename T2>
669 inline constexpr bool is_base_of_v = is_base_of<T1, T2>::value;
676 template <
typename T>
char test(
int T::*);
678 struct dummy {
char c[2]; };
679 template <
typename T> dummy test(...);
682 template <
typename T>
686 template <
typename T>
687 inline constexpr bool is_class_v = is_class<T>::value;
692 template <
typename T>
struct add_lvalue_reference {
typedef T& type; };
700 template <
typename T>
716 template <
typename T>
723 template <
typename T>
724 typename etl::add_rvalue_reference<T>::type
declval() ETL_NOEXCEPT;
736 template <
typename T,
typename =
int>
744 template <
typename T>
751 template <
typename T>
754 !is_class<T>::value &&
755 !is_arithmetic<T>::value &&
756 !is_reference<T>::value>
761 template <
typename T>
762 inline constexpr bool is_enum_v = etl::is_enum<T>::value;
768 template <
typename T>
771 static char test(
int);
772 static double test(...);
774 static const bool value =
sizeof(test(
static_cast<T
>(0))) ==
sizeof(
char);
779 template <
typename T>
782 static const bool value = private_type_traits::is_convertible_to_int<T>::value &&
783 !is_class<T>::value &&
784 !is_arithmetic<T>::value &&
785 !is_reference<T>::value;
797 template <
typename T>
803 template <
typename TFrom,
typename TTo>
806 template <
typename,
typename>
810#if defined(ETL_COMPILER_ARM5)
811 template <
typename TFrom,
typename TTo>
814 template <
typename TFrom,
typename TTo>
816 decltype(private_type_traits::nonvoid_convertible<TFrom, TTo>(0))::value) ||
817 (etl::is_void<TFrom>::value && etl::is_void<TTo>::value)> {};
822 template <
typename TFrom,
typename TTo >
823 inline constexpr bool is_convertible_v = etl::is_convertible<TFrom, TTo>::value;
829#if ETL_USING_CPP11 && !defined(ETL_COMPILER_ARM5)
830 template <
typename T>
struct alignment_of : integral_constant<size_t, alignof(T)> { };
831#elif defined(ETL_COMPILER_MICROSOFT)
832 template <
typename T>
struct alignment_of : integral_constant<size_t, size_t(__alignof(T))> {};
833#elif defined(ETL_COMPILER_IAR) || defined(ETL_COMPILER_TI)
834 template <
typename T>
struct alignment_of : integral_constant<size_t, size_t(__ALIGNOF__(T))> {};
836 template <
typename T>
struct alignment_of : integral_constant<size_t, size_t(__alignof__(T))> {};
841 template <>
struct alignment_of<
void> : integral_constant <size_t, 0> {};
842 template <>
struct alignment_of<
const void> : integral_constant <size_t, 0> {};
845 template <
typename T>
858 template <
typename T, T VALUE>
859 struct integral_constant : std::integral_constant<T, VALUE> {};
867 template <
typename T, T VALUE>
873 using bool_constant = std::bool_constant<B>;
876 struct bool_constant : std::integral_constant<bool, B> { };
888 template <
typename T>
889 using negation = std::negation<T>;
891 template <
typename T>
898 template <
typename T>
899 inline constexpr bool negation_v = std::negation_v<T>;
905 template <
typename T>
struct remove_reference : std::remove_reference<T> {};
908 template <
typename T>
915 template <
typename T>
struct remove_pointer : std::remove_pointer<T> {};
918 template <
typename T>
925 template <
typename T>
struct add_pointer : std::add_pointer<T> {};
928 template <
typename T>
935 template <
typename T>
struct is_const : std::is_const<T> {};
938 template <
typename T>
939 inline constexpr bool is_const_v = std::is_const_v<T>;
945 template <
typename T>
struct remove_const : std::remove_const<T> {};
948 template <
typename T>
955 template <
typename T>
struct add_const : std::add_const<T> {};
958 template <
typename T>
959 using add_const_t =
typename std::add_const<T>::type;
965 template <
typename T>
struct is_volatile : std::is_volatile<T> {};
968 template <
typename T>
975 template <
typename T>
struct remove_volatile : std::remove_volatile<T> {};
978 template <
typename T>
985 template <
typename T>
struct add_volatile : std::add_volatile<T> {};
988 template <
typename T>
995 template <
typename T>
struct remove_cv : std::remove_cv<T> {};
998 template <
typename T>
999 using remove_cv_t =
typename std::remove_cv<T>::type;
1005 template <
typename T>
struct add_cv : std::add_cv<T> {};
1008 template <
typename T>
1009 using add_cv_t =
typename std::add_cv<T>::type;
1015 template <
typename T>
struct remove_cvref
1017 typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type type;
1021 template <
typename T>
1028 template <
typename T>
struct is_integral : std::is_integral<T> {};
1031 template <
typename T>
1032 inline constexpr bool is_integral_v = std::is_integral_v<T>;
1038 template <
typename T>
struct is_signed : std::is_signed<T> {};
1041 template <
typename T>
1042 inline constexpr bool is_signed_v = std::is_signed_v<T>;
1048 template <
typename T>
struct is_unsigned : std::is_unsigned<T> {};
1051 template <
typename T>
1052 inline constexpr bool is_unsigned_v = std::is_unsigned_v<T>;
1058 template <
typename T>
struct is_floating_point : std::is_floating_point<T> {};
1061 template <
typename T>
1068 template <
typename T1,
typename T2>
struct is_same : std::is_same<T1, T2> {};
1071 template <
typename T1,
typename T2>
1072 inline constexpr bool is_same_v = std::is_same_v<T1, T2>;
1078 template<
typename T>
struct is_void : std::is_void<T> {};
1081 template <
typename T>
1082 inline constexpr bool is_void_v = std::is_void_v<T>;
1088 template<
typename T>
struct is_arithmetic : std::is_arithmetic<T> {};
1091 template <
typename T>
1098 template <
typename T>
struct is_fundamental : std::is_fundamental<T> {};
1101 template <
typename T>
1108 template <
typename T>
struct is_compound : std::is_compound<T> {};
1111 template <
typename T>
1112 inline constexpr bool is_compound_v = std::is_compound_v<T>;
1118 template <
typename T>
struct is_array : std::is_array<T> {};
1121 template <
typename T>
1122 inline constexpr bool is_array_v = std::is_array_v<T>;
1128 template<
typename T>
struct is_pointer : std::is_pointer<T> {};
1131 template <
typename T>
1132 inline constexpr bool is_pointer_v = std::is_pointer_v<T>;
1138 template<
typename T>
struct is_reference : std::is_reference<T> {};
1141 template <
typename T>
1148 template<
typename T>
struct is_lvalue_reference : std::is_lvalue_reference<T> {};
1151 template <
typename T>
1162 template <
typename T>
1170 template <
typename T>
1171 struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivial<T>::value> {};
1174 template <
typename T>
1175 inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivial_v<T>;
1178#if defined(ETL_COMPILER_GCC)
1179 #if ETL_COMPILER_VERSION >= 5
1180 #define ETL_GCC_V5_TYPE_TRAITS_SUPPORTED
1187 template <
bool B,
typename T,
typename F>
struct conditional {
typedef T type; };
1188 template <
typename T,
typename F>
struct conditional<false,
T,
F> {
typedef F type; };
1191 template <
bool B,
typename T,
typename F>
1198 template <
typename T>
struct make_signed : std::make_signed<T> {};
1201 template <
typename T>
1208 template <
typename T>
struct make_unsigned : std::make_unsigned<T> {};
1211 template <
typename T>
1218 template <
bool B,
typename T =
void>
struct enable_if : std::enable_if<B, T> {};
1221 template <
bool B,
typename T =
void>
1222 using enable_if_t =
typename std::enable_if<B, T>::type;
1228 template <
typename T,
unsigned MAXN = 0U>
1229 struct extent : std::extent<T, MAXN> {};
1232 template <
typename T,
unsigned MAXN = 0U>
1233 inline constexpr size_t extent_v = std::extent_v<T, MAXN>;
1239 template <
typename T>
struct remove_extent : std::remove_extent<T> { };
1242 template <
typename T>
1249 template <
typename T>
struct remove_all_extents : std::remove_all_extents<T> { };
1252 template <
typename T>
1259 template <
typename T>
struct rank : std::rank<T> {};
1262 template <
typename T>
1263 inline constexpr size_t rank_v = std::rank_v<T>;
1269 template <
typename T>
struct decay : std::decay<T> {};
1272 template <
typename T>
1273 using decay_t =
typename std::decay<T>::type;
1279 template<
typename TBase,
typename TDerived>
struct is_base_of : std::is_base_of<TBase, TDerived> {};
1282 template <
typename TBase,
typename TDerived>
1283 inline constexpr bool is_base_of_v = std::is_base_of_v<TBase, TDerived>;
1288 template <
typename T>
struct is_class : std::is_class<T>{};
1291 template <
typename T>
1292 inline constexpr bool is_class_v = is_class<T>::value;
1297 template <
typename T>
struct add_lvalue_reference : std::add_lvalue_reference<T> {};
1300 template <
typename T>
1311 template <
typename T>
1318 template <
typename T>
1319 typename std::add_rvalue_reference<T>::type
declval() ETL_NOEXCEPT;
1326 template <
typename T>
1327 struct is_enum : std::is_enum<T>
1332 template <
typename T>
1333 inline constexpr bool is_enum_v = etl::is_enum<T>::value;
1342 template <
typename TFrom,
typename TTo>
1347 template <
typename TFrom,
typename TTo>
1348 inline constexpr bool is_convertible_v = std::is_convertible_v<TFrom, TTo>;
1354 template <
typename T>
struct alignment_of : std::alignment_of<T> {};
1355 template <>
struct alignment_of<
void> : std::integral_constant<size_t, 0> {};
1356 template <>
struct alignment_of<
const void> : std::integral_constant <size_t, 0> {};
1359 template <
typename T>
1373 template <
typename...>
1378 template <
typename T1,
typename...
Tn>
1383 template <
typename T>
1390 template <
typename...
T>
1397 template <
typename...>
1402 template <
typename T1,
typename...
Tn>
1413 template <
typename...
T>
1422 template <
typename...
TTypes>
1425 template <
typename T>
1431 template <
typename T1,
typename T2,
typename...
TRest>
1438 template <
typename...
T>
1445 template <
bool B,
typename T, T TRUE_VALUE, T FALSE_VALUE>
1446 struct conditional_integral_constant;
1448 template <
typename T, T TRUE_VALUE, T FALSE_VALUE>
1455 template <
typename T, T TRUE_VALUE, T FALSE_VALUE>
1466 template <
typename T,
typename...
TRest>
1474 template <
typename T,
1481 static const bool value =
1502 template <
typename T,
typename...
TRest>
1511 template<
typename T,
typename...
TTypes>
1515 template<
typename T>
1521 template<
typename T,
typename THead,
typename...
TTail>
1527 template<
typename T,
typename...
TTypes>
1535 template <
typename T,
typename...
TRest>
1550 template <
typename T,
typename...
TRest>
1566 template <
typename T,
typename...
TRest>
1575 template <
size_t N,
typename TType>
1578 typedef typename nth_base<
N - 1U,
typename TType::base_type>::type type;
1581 template <
typename TType>
1582 struct nth_base<0,
TType>
1588 template <
size_t N,
typename TType>
1589 using nth_base_t =
typename nth_base<N, TType>::type;
1597 template <
typename T>
1606 typedef type_t type;
1607 typedef type_t& reference;
1608 typedef const type_t& const_reference;
1609 typedef type_t* pointer;
1610 typedef const type_t* const_pointer;
1611 typedef const type_t*
const const_pointer_const;
1619 template <
typename T>
1628 typedef type_t type;
1629 typedef type_t& reference;
1630 typedef const type_t& const_reference;
1631 typedef type_t* pointer;
1632 typedef const type_t* const_pointer;
1633 typedef const type_t*
const const_pointer_const;
1641 template <
typename T>
1642 struct types<
T*
const>
1650 typedef type_t type;
1651 typedef type_t& reference;
1652 typedef const type_t& const_reference;
1653 typedef type_t* pointer;
1654 typedef const type_t* const_pointer;
1655 typedef const type_t*
const const_pointer_const;
1663 template <
typename T>
1672 typedef type_t type;
1673 typedef type_t& reference;
1674 typedef const type_t& const_reference;
1675 typedef type_t* pointer;
1676 typedef const type_t* const_pointer;
1677 typedef const type_t*
const const_pointer_const;
1686 template <
typename T>
1695 typedef type_t type;
1696 typedef type_t& reference;
1697 typedef const type_t& const_reference;
1698 typedef type_t* pointer;
1699 typedef const type_t* const_pointer;
1700 typedef const type_t*
const const_pointer_const;
1709 template <
typename T>
1710 using types_t =
typename types<T>::type;
1712 template <
typename T>
1713 using types_r =
typename types<T>::reference;
1715 template <
typename T>
1716 using types_cr =
typename types<T>::const_reference;
1718 template <
typename T>
1719 using types_rr =
typename types<T>::rvalue_reference;
1721 template <
typename T>
1722 using types_p =
typename types<T>::pointer;
1724 template <
typename T>
1725 using types_cp =
typename types<T>::const_pointer;
1727 template <
typename T>
1728 using types_cpc =
typename types<T>::const_pointer_const;
1738 template <
typename T>
1745 template <
typename T,
typename...
TRest>
1752 template <
typename T,
typename...
TRest>
1757#if ETL_USING_STL && ETL_USING_CPP11 && !defined(ETL_USE_TYPE_TRAITS_BUILTINS) && !defined(ETL_USER_DEFINED_TYPE_TRAITS) && ((!defined(ARDUINO) && ETL_NOT_USING_STLPORT) || defined(ETL_GCC_V5_TYPE_TRAITS_SUPPORTED))
1765 template<
typename T1,
typename T2>
1766 using is_assignable = std::is_assignable<T1, T2>;
1770 template<
typename T,
typename...
TArgs>
1775 template <
typename T>
1776 using is_copy_constructible = std::is_copy_constructible<T>;
1780 template <
typename T>
1781 using is_move_constructible = std::is_move_constructible<T>;
1785#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
1786 template <
typename T>
1787 using is_trivially_constructible = std::is_trivially_constructible<T>;
1789 template <
typename T>
1795#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
1796 template <
typename T>
1797 using is_trivially_copy_constructible = std::is_trivially_copy_constructible<T>;
1799 template <
typename T>
1805#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
1806 template <
typename T>
1807 using is_trivially_destructible = std::is_trivially_destructible<T>;
1809 template <
typename T>
1815#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
1816 template <
typename T>
1817 using is_trivially_copy_assignable = std::is_trivially_copy_assignable<T>;
1819 template <
typename T>
1825#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
1826 template <
typename T>
1827 using is_trivially_copyable = std::is_trivially_copyable<T>;
1829 template <
typename T>
1833#elif defined(ETL_USE_TYPE_TRAITS_BUILTINS) && !defined(ETL_USER_DEFINED_TYPE_TRAITS)
1841 template<
typename T1,
typename T2>
1842 struct is_assignable
1850 template<
typename T,
typename...
TArgs>
1858 template<
typename T,
typename TArgs =
void>
1866 template<
typename T>
1875 template <
typename T>
1876 struct is_copy_constructible :
public etl::is_constructible<T, typename etl::add_lvalue_reference<const T>::type>
1882 template <
typename T>
1890 template <
typename T,
typename...
TArgs>
1891 struct is_trivially_constructible
1893#if defined(ETL_COMPILER_GCC)
1902 template <
typename T,
typename TArgs =
void>
1903 struct is_trivially_constructible
1905#if defined(ETL_COMPILER_GCC)
1914 template <
typename T>
1915 struct is_trivially_constructible<
T,
void>
1917#if defined(ETL_COMPILER_GCC)
1927 template <
typename T>
1928 struct is_trivially_copy_constructible :
public is_trivially_constructible<T, typename add_lvalue_reference<const T>::type>
1934 template <
typename T>
1935 struct is_trivially_destructible
1937#if defined(ETL_COMPILER_GCC)
1946 template <
typename T>
1947 struct is_trivially_copy_assignable
1949#if defined(ETL_COMPILER_GCC)
1958 template <
typename T>
1959 struct is_trivially_copyable
1961#if defined(ETL_COMPILER_GCC)
1968#elif defined(ETL_USER_DEFINED_TYPE_TRAITS) && !defined(ETL_USE_TYPE_TRAITS_BUILTINS)
1977 template <
typename T1,
1980 struct is_assignable;
1982 template <
typename T1,
typename T2>
1987 template <
typename T1,
typename T2>
1988 struct is_assignable<
T1,
T2, false>;
1993 template <
typename T,
bool B,
typename...
TArgs>
1996 template <
typename T,
typename...
TArgs>
2001 template <
typename T,
typename...
TArgs>
2004 template <
typename T,
typename...
TArgs>
2013 struct is_copy_constructible;
2015 template <
typename T>
2020 template <
typename T>
2021 struct is_copy_constructible<
T, false>;
2026 struct is_move_constructible;
2028 template <
typename T>
2033 template <
typename T>
2034 struct is_move_constructible<
T, false>;
2039 struct is_trivially_constructible;
2041 template <
typename T>
2046 template <
typename T>
2047 struct is_trivially_constructible<
T, false>;
2052 struct is_trivially_copy_constructible;
2054 template <
typename T>
2055 struct is_trivially_copy_constructible<
T, true> :
public etl::true_type
2059 template <
typename T>
2060 struct is_trivially_copy_constructible<
T, false>;
2065 struct is_trivially_destructible;
2067 template <
typename T>
2072 template <
typename T>
2073 struct is_trivially_destructible<
T, false>;
2078 struct is_trivially_copy_assignable;
2080 template <
typename T>
2085 template <
typename T>
2086 struct is_trivially_copy_assignable<
T, false>;
2091 struct is_trivially_copyable;
2093 template <
typename T>
2098 template <
typename T>
2099 struct is_trivially_copyable<
T, false>;
2110 template <
typename T1,
typename T2>
2111 struct is_assignable :
public etl::bool_constant<(etl::is_arithmetic<T1>::value || etl::is_pointer<T1>::value) && (etl::is_arithmetic<T2>::value || etl::is_pointer<T2>::value)>
2120 template <
class,
class T,
class...
Args>
2123 template <
class T,
class...
Args>
2129 template <
class T,
class...
Args>
2134 template <
class T>
struct is_copy_constructible :
public is_constructible<T, typename etl::add_lvalue_reference<typename etl::add_const<T>::type>::type>{};
2135 template <>
struct is_copy_constructible<
void> :
public false_type{};
2142 template <
typename T>
struct is_move_constructible:
public is_constructible<T, typename etl::add_rvalue_reference<T>::type>{};
2143 template <>
struct is_move_constructible<
void> :
public false_type{};
2152 template <
typename T>
2153 struct is_copy_constructible :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2159 template <
typename T>
2160 struct is_move_constructible :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2167 template <
typename T>
2168 struct is_trivially_constructible :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2174 template <
typename T>
2175 struct is_trivially_copy_constructible :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2181 template <
typename T>
2182 struct is_trivially_destructible :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2188 template <
typename T>
2189 struct is_trivially_copy_assignable :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2195 template <
typename T>
2196 struct is_trivially_copyable :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2202 template <
typename T1,
typename T2>
2203 struct is_lvalue_assignable :
public etl::is_assignable<typename etl::add_lvalue_reference<T1>::type,
2204 typename etl::add_lvalue_reference<typename etl::add_const<T2>::type>::type>
2211 template<
typename T,
typename =
void>
2214 template<
typename T>
2217 template <
typename T>
2218 struct is_default_constructible :
public etl::bool_constant<etl::is_arithmetic<T>::value || etl::is_pointer<T>::value>
2225 template <
typename T1,
typename T2>
2228 template <
typename T1,
typename T2>
2231 template<
typename T,
typename...
TArgs>
2234 template<
typename T,
typename...
TArgs>
2237 template<
typename T>
2240 template<
typename T>
2243 template <
typename T>
2246 template <
typename T>
2249 template <
typename T>
2252 template <
typename T>
2255 template <
typename T>
2268 template<
typename...>
2275 template <
typename T>
2282 template <
typename T1,
typename T2>
2285 template <
typename,
typename,
typename =
void>
2290 template <
typename T1,
typename T2>
2296 template <
typename T1,
typename T2,
typename =
void>
2302 template <
typename T1,
typename T2>
2311 template <
typename T1,
typename T2>
2313 :
etl::conditional<etl::is_same<T1, typename etl::decay<T1>::type>::value&& etl::is_same<T2, typename etl::decay<T2>::type>::value,
2314 private_common_type::common_type_2_impl<T1, T2>,
2315 common_type<typename etl::decay<T2>::type,
2316 typename etl::decay<T2>::type>>::type
2329 template <
typename T1,
typename T2,
typename...
TRest>
2331 :
common_type<typename common_type<T1, T2>::type, TRest...>
2336 template<
typename T1,
typename T2,
typename...
TRest>
2338 : private_common_type::common_type_multi_impl<void, T1, T2, TRest...>
2342 template <
typename...
T>
2349 template <
typename T>
2350 struct unsigned_type
2356 unsigned long long>::type>::type>::type>::type type;
2360 template <
typename T>
2367 template <
typename T>
2374 long long>::type>::type>::type>::type type;
2378 template <
typename T>
2385 template <
typename T>
2386 struct type_identity {
typedef T type; };
2389 template <
typename T>
2395#if ETL_USING_BUILTIN_UNDERLYING_TYPE
2398 struct underlying_type;
2401 template <
typename T>
2402 struct underlying_type<
T, false>
2405 ETL_STATIC_ASSERT(etl::is_enum<T>::value,
"etl::underlying_type can only be used with enumeration types.");
2408 template <
typename T>
2409 struct underlying_type<
T, true>
2416 template <
typename T>
2417 struct underlying_type
2424 template <
typename T>
2431 template <
typename...
TTypes>
2437 has_duplicates<TRest...>> {};
2439 template <
typename T>
2447 template <
typename...
TTypes>
2454 template <
typename T,
typename...
TTypes>
2457 template <
typename T,
typename U,
typename...
URest>
2459 etl::is_same<T, U>::value +
2460 count_of<T, URest...>::value> {};
2462 template <
typename T>
2467 template <
typename T,
typename...
TTypes>
2474 template <
typename T,
template <
typename...>
class Template>
2477 template <
template <
typename...>
class Template,
typename...
TArgs>
2482 template <
typename T,
template <
typename...>
class Template>
2488#define ETL_IS_CHAR_TYPE(type) (etl::is_same<char, type>::value || etl::is_same<signed char, type>::value || etl::is_same<unsigned char, type>::value)
2489#define ETL_IS_NOT_CHAR_TYPE(type) (!ETL_IS_CHAR_TYPE(type))
2491#define ETL_IS_POINTER_TYPE(type) (etl::is_pointer<type>::value)
2492#define ETL_IS_NOT_POINTER_TYPE(type) (!ETL_IS_POINTER_TYPE(type))
2494#define ETL_TARGET_IS_TRIVIALLY_COPYABLE(type) (etl::is_trivially_copyable<typename etl::iterator_traits<type>::value_type>::value)
2495#define ETL_TARGET_IS_NOT_TRIVIALLY_COPYABLE(type) (!ETL_TARGET_IS_TRIVIALLY_COPYABLE(type))
integral_constant< bool, false > false_type
integral_constant specialisations
Definition type_traits_generator.h:875
add_const
Definition type_traits_generator.h:967
add_pointer
Definition type_traits_generator.h:937
add_volatile
Definition type_traits_generator.h:997
add_rvalue_reference
Definition type_traits_generator.h:1366
conditional
Definition type_traits_generator.h:1199
decay
Definition type_traits_generator.h:1281
integral_constant
Definition type_traits_generator.h:871
is_arithmetic
Definition type_traits_generator.h:1100
is_array
Definition type_traits_generator.h:1130
is_const
Definition type_traits_generator.h:947
is_fundamental
Definition type_traits_generator.h:1110
is_integral
Definition type_traits_generator.h:1040
is_lvalue_reference
Definition type_traits_generator.h:1160
is_rvalue_reference
Definition type_traits_generator.h:1183
is_pointer
Definition type_traits_generator.h:1140
is_same
Definition type_traits_generator.h:1080
is_signed
Definition type_traits_generator.h:1050
is_unsigned
Definition type_traits_generator.h:1060
is_volatile
Definition type_traits_generator.h:977
remove_const
Definition type_traits_generator.h:957
remove_cv
Definition type_traits_generator.h:1007
remove_extent
Definition type_traits_generator.h:1251
remove_pointer
Definition type_traits_generator.h:927
remove_reference
Definition type_traits_generator.h:917
remove_volatile
Definition type_traits_generator.h:987
bitset_ext
Definition absolute.h:38
ETL_NODISCARD ETL_CONSTEXPR14 T round_half_even_unscaled(T value) ETL_NOEXCEPT
Definition scaled_rounding.h:314
add_lvalue_reference
Definition type_traits_generator.h:1309
Definition type_traits_generator.h:888
Definition type_traits_generator.h:2119
Definition type_traits_generator.h:2161
Definition type_traits_generator.h:2226
Definition type_traits_generator.h:2212
Definition type_traits_generator.h:2168
Definition type_traits_generator.h:2176
Definition type_traits_generator.h:2197
Definition type_traits_generator.h:2183
Definition type_traits_generator.h:2204
Definition type_traits_generator.h:2190
size_of
Definition type_traits_generator.h:1741
void add_pointer(const volatile void *value, TIString &str, const etl::basic_format_spec< TIString > &format, const bool append)
Helper function for pointers.
Definition to_string_helper.h:443