
26 Apr
2012
26 Apr
'12
8:26 p.m.
On 26/04/12 22:08, Jeffrey Lee Hellrung, Jr. wrote:
Doesn't the same thing happen in boost::optional and boost::variant?
Yes, their code is arguably ill-formed, but I'm sure some people claim otherwise. AFAIK the only way to implement this in a standard conforming way is with C++11 unrestricted unions. Alternatively, all compilers that implement strict aliasing provide attributes to allow aliasing locally.