Next: , Previous: Strong Using, Up: C++ Extensions

6.10 Offsetof

G++ uses a syntactic extension to implement the offsetof macro.

In particular:

       __offsetof__ (expression)

is equivalent to the parenthesized expression, except that the expression is considered an integral constant expression even if it contains certain operators that are not normally permitted in an integral constant expression. Users should never use __offsetof__ directly; the only valid use of __offsetof__ is to implement the offsetof macro in <stddef.h>.