31#ifndef ETL_CLASS_TRAITS_INCLUDED
32#define ETL_CLASS_TRAITS_INCLUDED
40#if ETL_CPP11_SUPPORTED
44#if ETL_CPP11_SUPPORTED
52 struct two {
char x[2]; };
54 template <
typename C>
static constexpr one test(
decltype(&
C::begin)*);
55 template <
typename C>
static constexpr two test(...);
59 static constexpr bool value = (
sizeof(test<T>(0)) ==
sizeof(
char));
62#if ETL_CPP17_SUPPORTED
64 static constexpr bool has_begin_v = has_begin<T>::value;
74 struct two {
char x[2]; };
76 template <
typename C>
static constexpr one test(
decltype(std::declval<C>().
end()));
77 template <
typename C>
static constexpr two test(...);
81 static constexpr bool value = (
sizeof(test<T>(0)) ==
sizeof(
char));
84#if ETL_CPP17_SUPPORTED
86 static constexpr bool has_end_v = hasend<T>::value;
96 struct two {
char x[2]; };
98 template <
typename C>
static one test(
decltype(std::declval<C>().size()));
99 template <
typename C>
static two test(...);
103 static constexpr bool value = (
sizeof(test<T>(0)) ==
sizeof(
char));
106#if ETL_CPP17_SUPPORTED
107 template <
typename T>
108 static constexpr bool has_size_v = has_size<T>::value;
114 template <
typename T>
118 struct two {
char x[2]; };
120 template <
typename C>
static one test(
decltype(std::declval<C>().
max_size()));
121 template <
typename C>
static two test(...);
125 static constexpr bool value = (
sizeof(test<T>(0)) ==
sizeof(
char));
128#if ETL_CPP17_SUPPORTED
129 template <
typename T>
130 static constexpr bool has_max_size_v = has_max_size<T>::value;
136 template <
typename T>
140 struct two {
char x[2]; };
142 template <
typename C>
static constexpr one test(
decltype(std::declval<C>().empty()));
143 template <
typename C>
static constexpr two test(...);
147 static constexpr bool value = (
sizeof(test<T>(0)) ==
sizeof(
char));
150#if ETL_CPP17_SUPPORTED
151 template <
typename T>
152 static constexpr bool has_empty_v = has_empty<T>::value;
158 template <
typename T>
162 struct two {
char x[2]; };
164 template <
typename C>
static constexpr one test(
decltype(std::declval<C>().data()));
165 template <
typename C>
static constexpr two test(...);
169 static constexpr bool value = (
sizeof(test<T>(0)) ==
sizeof(
char));
172#if ETL_CPP17_SUPPORTED
173 template <
typename T>
174 static constexpr bool has_data_v = has_data<T>::value;
bitset_ext
Definition: absolute.h:38
size_t max_size() const
Returns the maximum number of items in the variant_pool.
Definition: variant_pool_generator.h:281
ETL_CONSTEXPR TContainer::iterator begin(TContainer &container)
Definition: iterator.h:931
ETL_CONSTEXPR TContainer::iterator end(TContainer &container)
Definition: iterator.h:961