This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: I'm sorry, but this is unacceptable (union members and ctors)
On 6/16/07, michael.a <wild.eyed.boy.from.freecloud@gmail.com> wrote:
You are of course free to demonstrate how placement new could circumnavigate
the need of unions.
Boost.Variant implements discriminated unions using placement new:
http://www.boost.org/doc/html/variant.html
Of course, you would have to mimic the techniques it is using and/or
change your code to use Boost.Variant. But, since you've relied on an
extension to C++, you'll have to change your code to make it portable
anyway.
- Doug