Go to the documentation of this file.
9 #ifndef EAGINE_MEMORY_ALIGN_HPP
10 #define EAGINE_MEMORY_ALIGN_HPP
12 #include "../type_identity.hpp"
13 #include "../types.hpp"
15 namespace eagine::memory {
21 return addr % alignment;
54 #endif // EAGINE_MEMORY_ALIGN_HPP
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
static constexpr auto misalignment(std::nullptr_t, span_size_t) noexcept -> span_size_t
Calculates basic numeric address misalignment.
Definition: align.hpp:26
static constexpr auto is_aligned_as(span_size_t addr, type_identity< T >={}) noexcept
Indicates if a basic numeric address is aligned to alignment of type T.
Definition: align.hpp:48
static constexpr auto is_aligned_to(std::nullptr_t, span_size_t) noexcept
Indicates if a basic numeric address is aligned.
Definition: align.hpp:40
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19