template<class T>
T GetValue(const int offset)
{
try
{
return *reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this) + offset);
}
catch (...) //Обработка ошибок (исключений)
{
return *reinterpret_cast<T*>(reinterpret_cast<std::uintptr_t>(this));
}
}