Boost logo

Boost :

Subject: Re: [boost] [Smart Ptr] make_shared slower than shared_ptr(new) on VC++9 (and 10) with fix
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-04-26 16:26:24


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.


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