[cxx-abi-dev] What is a POD? TC1 or first C++ Standard

Nathan Sidwell nathan at codesourcery.com
Fri Sep 24 08:17:57 UTC 2004


Dennis Handly wrote:
>>From: Gabriel Dos Reis <gdr at cs.tamu.edu>
>>And it would appear to users very counter-intuitive and confusing if
>>pointer-to-members were treated very differently from other PODs.
> 
> 
> I wouldn't think so.  It was there in black and white saying they are
> not PODs, 9(4).  ;-)
> Probably because they are not available in C.

I was the submitter of DR 148, responsible for this change.  I pointed
out that pointers-to-members themselves were PODs [3.9]/10, but a structure
containing that particular POD would be non-POD.  That was inconsistent.

ah, found it. http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#148


148. POD classes and pointers to members
Section: 9  class     Status: TC1     Submitter: Nathan Sidwell     Date: 31 Jul 1999

3.9  basic.types paragraph 10 defines pointer to member types to be scalar types.
It also defines scalar types to be one of the POD types.

9  class paragraph 4 defines a POD struct as an aggregate class with no non-static
data members of type pointer to member.

It seems contradictory that a type can be POD, yet a class containing that type
is non-POD.

Suggested resolution: Alter 9  class paragraph 4 to allow pointer to member objects
as non-static data members of POD class.

Proposed resolution (10/00):

In 9  class paragraph 4, remove all occurrences of "pointer to member."

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan at codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk





More information about the cxx-abi-dev mailing list