Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-09 15:02:24


--- Rainer Deyke <rainerd_at_[hidden]> wrote:
> Brock Peabody wrote:
> > (5) If variant can be singular you will need an additional case for
> > each variant and possibly turn many compile-time errors into run-time
> > errors.
> > This is a fact too.
>
> While trivially true, I doubt this is actually important in real code. If a
> variant operation that only provides the basic guarantee throws, the state
> of the variant is "valid" but undefined. This means that the variant
> contains no useful data, and the invariants of the piece of code which uses
> the variant may (temporarily) be broken. The only meaningful responses to
> the exception are therefore to replace the value in the variant with another
> (potentially resulting in another exception) or to destroy the variant
> (explicitly or implictly).
>

Agree, exactly my point.

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