31 #ifndef ETL_ALIGNEMENT_INCLUDED
32 #define ETL_ALIGNEMENT_INCLUDED
38 #include "static_assert.h"
46 namespace private_alignment
51 template <const
bool IS_MATCH, const
size_t ALIGNMENT,
typename T1 =
void,
typename T2 =
void,
typename T3 =
void,
typename T4 =
void,
typename T5 =
void,
typename T6 =
void,
typename T7 =
void,
typename T8 =
void>
55 template <const
size_t ALIGNMENT,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
64 template <const
size_t ALIGNMENT,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
73 template <const
size_t ALIGNMENT>
84 template <const
size_t ALIGNMENT,
typename T1,
typename T2 =
void,
typename T3 =
void,
typename T4 =
void,
typename T5 =
void,
typename T6 =
void,
typename T7 =
void,
typename T8 =
void>
97 template <const
size_t ALIGNMENT>
102 #if ETL_NOT_USING_64BIT_TYPES
114 template <const
size_t LENGTH, const
size_t ALIGNMENT>
120 template <
typename T>
129 template <
typename T>
130 operator const T& ()
const
138 template <
typename T>
142 return reinterpret_cast<T*
>(data);
146 template <
typename T>
147 operator const T* ()
const
150 return reinterpret_cast<const T*
>(data);
154 template <
typename T>
163 template <
typename T>
172 template <
typename T>
176 return reinterpret_cast<T*
>(data);
180 template <
typename T>
184 return reinterpret_cast<const T*
>(data);
187 #if ETL_CPP11_SUPPORTED && !defined(ETL_COMPILER_ARM5)
188 alignas(ALIGNMENT)
char data[LENGTH];
193 typename etl::type_with_alignment<ALIGNMENT>::type etl_alignment_type;
199 #if ETL_CPP14_SUPPORTED
200 template <const
size_t LENGTH, const
size_t ALIGNMENT>
201 using aligned_storage_t =
typename aligned_storage<LENGTH, ALIGNMENT>::type;
208 template <
size_t LENGTH,
typename T>
213 #if ETL_CPP14_SUPPORTED
214 template <
size_t LENGTH,
typename T>
Definition: alignment.h:86
Definition: alignment.h:52
Definition: alignment.h:99
Definition: alignment.h:116
Definition: alignment.h:210
add_rvalue_reference
Definition: type_traits_generator.h:1348
is_same
Definition: type_traits_generator.h:981
Definition: absolute.h:37
Definition: alignment.h:118
const T & get_reference() const
Get address as const T reference.
Definition: alignment.h:164
T & get_reference()
Get address as T reference.
Definition: alignment.h:155
const T * get_address() const
Get address as const T pointer.
Definition: alignment.h:181
T * get_address()
Get address as T pointer.
Definition: alignment.h:173