From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-08-04 15:18:54
On Mon, Aug 4, 2008 at 12:04 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> Emil Dotchevski wrote:
>> Also, I am not necessarily advocating strong exception guarantee. I
>> would be fine if the semantics of operator= were such that it may
>> leave the object in a particular unusual state. The problem is that as
>> it is now, it may leave the object in a seemingly OK state.
> "Implementation Note*: So as to make the behavior of |variant|
> more predictable in the aftermath of an exception, the current
> prefers to default-construct |boost::blank| if specified as a bounded type
> instead of other nothrow default-constructible bounded types. (If this is
> deemed to be a useful feature, it will become part of the specification for
> |variant|; otherwise, it may be obsoleted. Please provide feedback to the
> Boost mailing list.)"
Yes, I was aware of this workaround and of the one Mathias mentioned.
However, variant<foo,bar,blank> and variant<wrapper<foo>,wrapper<bar>>
aren't the same as variant<foo,bar>. I'm questioning the rationale of
the current variant::operator= semantics, not necessarily looking for
a way to work around them.
Reverge Studios, Inc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk