From: brock (brock.peabody_at_[hidden])
Date: 2003-10-08 21:01:54
----- Original Message -----
From: "E. Gladyshev" <egladysh_at_[hidden]>
> I realize it now.
> I think that it is ok to have a singular variant.
> It should be treated as unallocated memory
> any access to it should generate an exception.
The downside is that then all users of boost::variant have to test for this
possible condition or be prepared for runtime failure where otherwise they
could rely on the variant to contain one of the specified types. Rather
than force this complexity on those who aren't concerned with the
possibility of using the heap backup, those who want this behaviour can just
specify boost::empty as on of the possible types of the variant. As Dave
was saying you are in effect using boost::empty to specify the policy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk