There seems to be frequent use of offsetof() inside of the Urho3D engine. I’m surprised that this hasn’t caused any problems considering its documented to be only valid for standard layout classes (c++11; cplusplus(dot)com/reference/cstddef/offsetof/). Urho3D doesn’t seem to care and utilizes this function for classes that are not standard layout classes because they implement virtual functions.
So can anyone explain whats going on? is there problems because of this? or perhaps it just happens to work? or maybe I’m wrong?