[Development] QProperty and library coding guide

Thiago Macieira thiago.macieira at intel.com
Mon Jul 20 19:42:18 CEST 2020

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)

(if the MSVC isn't showing, scroll to the bottom)

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering

More information about the Development mailing list