Boost logo

Boost :

Subject: Re: [boost] aligned_storage in unions
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-09-22 14:46:42


On 22/09/2010 18:35, Larry Evans wrote:
> How would C++0x avoid the problem?

By allowing to put non-PODs in unions.

> Could you point to the variant code violating this rule?

aligned_storage<whatever>::type is a POD type of a certain type T.
In order to read and write any of the object a variant can hold, it will
need to reinterpret cast from a pointer to that object to a pointer to
any of these object types, that are not necessarily the same as T.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk