
22 Sep
2010
22 Sep
'10
6:46 p.m.
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.