POD
Maxim Fomin
maxim at maxim-fomin.ru
Thu Dec 20 04:00:42 PST 2012
On Thursday, 20 December 2012 at 10:57:08 UTC, Andrej Mitrovic
wrote:
> On 12/20/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
>> They can have functions.. in
>> which case they aren't POD types at all.
>
> Having regular functions doesn't change the state of PODs.
> Having a
> ctor/dtor/postblit probably does though (you can no longer
> safely do a
> memcpy).
How presence of ctor/dtor/postblit affect the POD (in a sense of
changing structure size and alignment)?
>
> But AFAIK you can always rely on the field layout of a
> non-nested D
> struct, so a D struct should mostly remain compatible to C
> structs.
Agree, unless it is a non-static nested function struct which has
hidden member.
More information about the Digitalmars-d
mailing list