From 5464701642390377806
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,855073145fb9fdb7
X-Google-Attributes: gidf78e5,public
From: Email_To::.Hans.Olsson@dna.lth.se (Hans Olsson)
Subject: Re: Minimum Size of Array in Standard (solution)
Date: 1998/11/13
Message-ID: <72gt0j$kn7$1@news.lth.se>#1/1
X-Deja-AN: 411449738
Content-Transfer-Encoding: 8bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <199811032027.NAA25799@ncar.ucar.EDU> <72ak12$ma2$1@shell7.ba.best.com> <72c1m9$ikm$1@news.lth.se> <72e9ql$mgp$1@shell7.ba.best.com>
X-Original-Date: 13 Nov 1998 09:09:39 GMT
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 910965344 11067 128.250.29.16 (13 Nov 1998 13:55:44 GMT)
Organization: Lund Institute of Technology, Sweden
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANkw6RuEDnX0m9pzZAQHwNQF/WHL7BMA2Fpbp6tEFCm2CDvYaNI3u5Cp6 stAaqDQNeM7DffPnvy5kkdRjNPFkXtOp =b62k
Mime-Version: 1.0
NNTP-Posting-Date: 13 Nov 1998 13:55:44 GMT
Newsgroups: comp.std.c++

In article <72e9ql$mgp$1@shell7.ba.best.com>,
Nathan Myers <ncm@nospam.cantrip.org> wrote:
>[Deleted] I think a union cannot contain padding before
>its first member, at least. 

Looking back and forth in CD2 (9.5/1, 9.2/17, 5.9/2) I found that a union 
with a POD member cannot contain padding before its members.

Since we assume that T is a POD-type there will not be any padding 
in this case (assuming there were no substantial changes in this area
between CD2 and the standard)

I'm not sure about unions without POD-members, but I fail to see the
need for any padding, especially since all members must have the 
same adress (5.9/2).
--
// Home page  http://www.dna.lth.se/home/Hans_Olsson/
// Email To..Hans.Olsson@dna.lth.se [Please no junk e-mail]
---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



