On Monday, 20 July 2020 10:26:34 PDT Ville Voutilainen wrote: > The only dispute in the offsetof article is about whether that > indirection is UB in C. In C++ it is, and will remain so. > That's why C++-compliant stddef.h implementations don't do that.
$ gcc -dM -E -include stddef.h -xc++ /dev/null | grep offsetof #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) https://gcc.godbolt.org/z/jzY1qe (if the MSVC isn't showing, scroll to the bottom) -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel DPG Cloud Engineering _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development