- From: Thomas Mueller <tomtom.mueller@gmx.de>
- Date: Thu, 10 Mar 2005 21:07:55 +0700
- To: "public-compound-documents lists.w3.org" <public-compound-documents@w3.org>
- Message-ID: <000901c5257a$93f3e680$4201a8c0@bigmac>
>From the Standard, at 9.2, para 17: A pointer to a POD-struct object, suitably converted using a reinterpret_cast, points to its initial member (or if that member is a bit-field, then to the unit in which it resides) and vice versa. [Note: There might therefore be unnamed padding within a POD-struct object, but not at its beginning, as necessary to achieve appropriate alignment. ] In your example, "C"'s initial member is "a", of type A; "A"'s initial member is "x", of type double; and "c" is of type C. Given types C and A are POD-struct types (which they are), and that you use reinterpret_cast (which you have), your program appears (to me) to be Standard compliant. Of course, don't take my word for it; wait for Steve Clamage. --Thomas --- GoldED/386 2.42.G0614+ * Origin: Everything goes the bach runter ... * http://www.universityedu.org
Attachments
- text/html attachment: 50308x16.html
- text/html attachment: 50308x01.html
- text/html attachment: 50308x02.html
- text/html attachment: 50308x03.html
- text/html attachment: 50308x04.html
- text/html attachment: 50308x05.html
- text/html attachment: 50308x06.html
- text/html attachment: 50308x07.html
- text/html attachment: 50308x08.html
- text/html attachment: 50308x09.html
- text/html attachment: 50308x10.html
- text/html attachment: 50308x11.html
- text/html attachment: 50308x12.html
- text/html attachment: 50308x13.html
- text/html attachment: 50308x14.html
- text/html attachment: 50308x15.html
Received on Thursday, 10 March 2005 14:08:43 UTC