POD

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Dec 28 19:37:53 PST 2012


On 12/28/12 10:12 PM, Walter Bright wrote:
> For example, C++ disallows mixed public/private data in a POD. I've
> never understood the reason for that restriction other than "C doesn't
> have private fields". D doesn't propagate that aspect.

The idea was to leave C++ compilers to change the order of fields in 
classes with private data for optimal layout. I don't know of any 
compilers that do, but that was the intent. PODs were not susceptible to 
such layout optimization because they had to be compatbile with C's layout.

Andrei


More information about the Digitalmars-d mailing list