|
Boost : |
Subject: Re: [boost] Another variant type (was: [peer review queue tardiness] [was Cleaning out the Boost review queue] Review Queue mem
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2015-04-13 22:16:09
On Apr 9, 2015 2:57 PM, "pfultz2" <pfultz2_at_[hidden]> wrote:
> Why can't you create a constexpr copy constructor with a recursive union?
You can't in the general case because you have to call the constructor of
the appropriate internal type. You can't placement new, so you have to do
it via a member initializer, so which internal type's constructor do you
call? If you have all types with trivial copy constructors you can make it
work, but not in the general case.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk