From: Eric Friedman (ebf_at_[hidden])
Date: 2003-10-08 19:34:28
E. Gladyshev wrote:
> --- Brock Peabody <brock.peabody_at_[hidden]> wrote:
>>I may be wrong, but I think they had already determined that there was no
>>way to get the basic guarantee for classes without no-throw copy
>>constructors unless they used the backup heap. I bet they would be thrilled
>>if you could prove them wrong :)
> I have to check the links that Dave pointed me to
> and think about it some more.
> But intuitevely the backup heap requirement doesn't seem
> to be necessary for the basic safety.
> If you have any references on why I am wrong, please
> let me know.
The summary is that unless we allow singular variants, some mechanism
(double storage, heap backup, etc.) is needed in general to guarantee
constructed content for variant.
So maybe (?) the answer is that we should allow singular variants. Such
a change would reflect a fundamental change to variant's semantics
though, so I believe we should very carefully consider the outcome of
such a decision.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk