
From: David Abrahams <dave@boostpro.com>
To: "boost@lists.boost.org" <boost@lists.boost.org> Sent: Thu, September 23, 2010 7:18:22 PM Subject: Re: [boost] aligned_storage in unions
On Sep 23, 2010, at 11:37 AM, Frank Mori Hess wrote:
What is this based on? There is a strict aliasing exception for char*, but
all I see in the standard about static_casting through void is (paragraph 10
of 5.2.9):
Sorry, no time to trawl the standard right now. The above matches my hard-won understanding but of course I could always be wrong about anything ;-)
I think u mean 9.2/19: "A pointer to a standard-layout 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 standard-layout struct object, but not at its beginning, as necessary to achieve appropriate alignment. =97end note ]"
-- Dave Abrahams BoostPro Computing http://boostpro.com