Function wrench::offset_ptr

Function Documentation

auto wrench::offset_ptr (const void *ptr, uint32_t amount) noexcept -> void *

Returns a new ptr offset by amount from ptr.

Note

This does not ensure alignemt. If the pointer needs to be aligned, then pass the result to align().

Parameters
  • ptr: The pointer to offset.

  • amount: The amount to offset ptr by.