3#ifndef TETL_MEMORY_ALIGN_HPP
4#define TETL_MEMORY_ALIGN_HPP
27 off = alignment - off;
29 if (space < off || space - off <
size) {
33 ptr =
static_cast<char*
>(ptr) + off;
constexpr auto bit_cast(From const &src) noexcept -> To
Obtain a value of type To by reinterpreting the object representation of from. Every bit in the value...
Definition bit_cast.hpp:38
constexpr auto size(C const &c) noexcept(noexcept(c.size())) -> decltype(c.size())
Returns the size of the given container c or array array. Returns c.size(), converted to the return t...
Definition size.hpp:18
Definition adjacent_find.hpp:8
auto align(etl::size_t alignment, etl::size_t size, void *&ptr, etl::size_t &space) noexcept -> void *
Given a pointer ptr to a buffer of size space, returns a pointer aligned by the specified alignment f...
Definition align.hpp:22
TETL_BUILTIN_SIZET size_t
etl::size_t is the unsigned integer type of the result of the sizeof operator.
Definition size_t.hpp:14