Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-07 21:18:40


--- Eric Friedman <ebf_at_[hidden]> wrote:
[...]

>
> Some questions:
>
> * Heap backup is on by default. Why would it matter if the user
> inadvertently turns it off?
>
> * What exactly do you mean by "variant protection"? The reason heap
> backup can be turned off in certain cases is because it is *not needed*
> in those cases. The guarantees made by variant are always the same.

I guess I am missing something here.
I thought that the heap backup is supposed to protect variant
from possible exceptions during assignments. The exceptions
can be thrown by constructors of types included in the variant.
If an exception happens the variant will restore it's state
from the backup heap. If it what the backup heap is for
then by specifying an 'int' as the first type, the exceptions that
are thrown by other types constructors will result
in an empty lhs variant. While if the first type throws,
exceptions won't change the lhs variant.

Eugene

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


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