POD

Red resmith at lavabit.com
Wed Dec 19 19:31:05 PST 2012


I am learning D and reading the Kindle spec. It says:

"In C++ parlance, a D struct is a POD (Plain Old Data) type" with
a trivial constructors and destructors".

<POD (Plain Old Data)> is a link. Clinking on it leads to this
definition at dlang.org:

"Refers to a struct that contains no hidden members, does not
have virtual functions, does not inherit, has no destructor, and
can be initialized and copied via simple bit copies. D structs
are POD."

The definition says no destructor and no hidden members. Whereas
above it says that a D struct has a (trivial) destructors.

And below that in the spec there is a table which has a row for
"hidden members". It shows that a D struct has hidden members.

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.


More information about the Digitalmars-d mailing list