Function wrench::align_ptr¶
Defined in File memory_utils.hpp
Function Documentation¶
-
auto wrench::align_ptr (const void *ptr, size_t alignment) noexcept -> void *
Returns a pointer with an address aligned to
alignment
. This will fail at runtime if thealignemnt
is not a power of two.- Parameters
ptr
: The pointer to align.alignment
: The alignment to ensure.