I have a question relating to alignment in C/C++. In Determining the alignment of C/C++ structures in relation to its members Michael Burr posted this macro:
#define TYPE_ALIGNMENT( t ) offsetof( struct { char x; t test; }, test )
In the comments someone wrote this might fail with non POD types. Can someone give me an code example where this fails?