offsetof
offsetof
Defined in header <cstddef> | ||
---|---|---|
#define offsetof(type, member) /*implementation-defined*/ |
The macro offsetof
expands to an integral constant expression of type std::size_t
, the value of which is the offset, in bytes, from the beginning of an object of specified type to its specified member, including padding if any.
If type
is not a standard layout type, the behavior is undefined.