Stand/Stand/atoffset.hpp
2024-10-16 11:20:42 +08:00

13 lines
223 B
C++

#pragma once
#include <cstdint>
namespace Stand
{
template <typename T>
[[nodiscard]] constexpr T* atoffset(void* obj, uintptr_t offset)
{
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(obj) + offset);
}
}