tetl 0.1.0
Embedded Template Library
|
High-level memory management utilities. More...
Functions | |
template<etl::size_t N, typename T> | |
constexpr auto | assume_aligned (T *ptr) -> T * |
Informs the implementation that the object ptr points to is aligned to at least N. The implementation may use this information to generate more efficient code, but it might only make this assumption if the object is accessed via the return value of assume_aligned. | |
High-level memory management utilities.
|
nodiscardconstexpr |
Informs the implementation that the object ptr points to is aligned to at least N. The implementation may use this information to generate more efficient code, but it might only make this assumption if the object is accessed via the return value of assume_aligned.
The program is ill-formed if N is not a power of 2. The behavior is undefined if ptr does not point to an object of type T (ignoring cv-qualification at every level), or if the object's alignment is not at least N.