D-Programming-Language/dmd — pull request #3061 by ibuclaw (2014-01-05 01:17:01+00:00)
Title: Relax isPOD rules so ctors don't make structs non-POD

I was scratching my head at this for sometime as initially it seemed that C++ had two conflicting standards.

However it seems quite clear that a POD *Aggregate* must not have user-defined constructors (aggregate being any non-scalar and non-vector type, eg: static array) and a POD *Struct* may have a user-defined constructor - though it does not say this in writing, it only says what a POD Struct should not have. That being no destructors, copy constructors or assignment operators.

To still be compatible with C++, non-PODs must be passed by hidden/invisible reference. Someone with DMD-backend knowledge will have to check this is the case.

Also, perhaps we should check for ``opAssign`` to validate that the struct is truly POD.