Function wrench::align_ptr

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 the alignemnt is not a power of two.

Parameters
  • ptr: The pointer to align.

  • alignment: The alignment to ensure.