POD

Jonathan M Davis jmdavisProg at gmx.com
Wed Dec 19 19:39:57 PST 2012


On Thursday, December 20, 2012 04:31:05 Red wrote:
> Not a major issue of course, but I am just wondering why the
> definition of POD says "no destructor" and "no hidden members"
> whereas a D struct has both and is referred to as POD.

D structs really aren't necessarily PODs. They can be used as PODs, but they 
don't have to be. A POD is basically a C struct which just holds data. D 
structs are nearly identical to C classes except for the fact that they can't 
have inheritance. They can have functions, destructors data hiding, etc., in 
which case they aren't POD types at all. The D docs should probably be 
changed.

- Jonathan M Davis


More information about the Digitalmars-d mailing list