Boost logo

Boost :

Subject: Re: [boost] aligned_storage in unions
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2010-09-17 11:32:27


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 17 September 2010, dherring_at_[hidden] wrote:
> The "standard" workaround is to allocate your own memory and use manual
> type casting. Boost::aligned_storage can be used to maintain proper
> alignment, but it cannot be placed inside a union due to the default ctor,
> dtor, and noncopyable functions. Thus I am forced to use part of
> boost::detail.

> Questions:
> - Is there a better way to do this?

What about using boost.variant instead?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkyTigwACgkQ5vihyNWuA4V9CwCfUeklRZYdk+v+iMR0is8KnTAW
gwwAn1v7A9Qn5Fot58cKOHhwUxmAvOIR
=jr/m
-----END PGP SIGNATURE-----


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