Topic: confusion about PODs


Author: thimm@physik.fu-berlin.de (Axel Thimm)
Date: 1997/03/08
Raw View
Hello,
could someone shed some light on the definition of a POD:

In 9.0.1 Dec 2nd, 1996

"A POD-struct is an aggregate  class that  has  no  non-static data
members of type pointer to member, non-POD-struct, non-POD-union (or
array of such types) or  reference, and has  no  user-defined  copy
assignment  operator  and no user-defined destructor."
where the footnote says that POD stand for "plain ol' data"

In which sense is "plain ol' data" to be understood, C style data?
Why are no restrictions on other constructors than copy?
Could someone give examples of PODs and non-PODs?

Thanks,
 Axel Thimm.
--
Axel Thimm   thimm@physik.fu-berlin.de thimm@ifh.de
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: bparker@gil.com.au (Brian Parker)
Date: 1997/03/11
Raw View
thimm@physik.fu-berlin.de (Axel Thimm) wrote:

>Hello,
>could someone shed some light on the definition of a POD:

As an aside, a good article on the standard's memory model is
"Standard Update. The memory model-type representations". C++ Report
May 96 and later columns.

>In which sense is "plain ol' data" to be understood, C style data?
>Why are no restrictions on other constructors than copy?

I think that POD's are intended to be usable exactly like C style data
structures particularly so that they can interface to C code. The copy
assignment restriction would allow bit-wise copy to be used, as is
commonly done for C structs.

,Brian parker (bparker@gil.com.au)

---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]