cpp/types/offsetof

The macro offsetof expands to an integral constant expression of type std, the value of which is the offset, in bytes, from the beginning of an object of specified type to its specified subobject, including padding bits if any.

Given an object of type  and static storage duration,  shall be an lvalue constant expression that refers to a subobject of. Otherwise, the behavior is undefined. Particularly, if is a static data member, a bit-field, or a member function, the behavior is undefined.

If is not a,.

The expression is never type-dependent and it is value-dependent if and only if  is dependent.

Exceptions
throws no exceptions.