За что я люблю Rust:
https://github.com/boostorg/serialization/blob/develop/include/boost/serialization/void_cast.hpp#L186
reinterpret_cast<std::ptrdiff_t>(
static_cast<Derived *>(
reinterpret_cast<Base *>(8)
)
) - 8