Boost logo

Boost :

Subject: Re: [boost] [variant] Basic rvalue and C++11 features support
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-01-14 13:06:02


On 01/14/13 11:11, Giovanni Piero Deretta wrote:
> On Mon, Jan 14, 2013 at 4:37 PM, Larry Evans <cppljevans_at_[hidden]>wrote:
>
>> [...]
>
>
> Thus, there is no indication in the variant that anything has gone
>> wrong other than the fact that the variant's value has not changed
>> from it's state before the assignment.
[snip]
>
> An exception being thrown (well, propagated) is a fairly strong indication
> that something unusual has happened. Variant does not swallow the exception
> that caused the rollback.
>
> --
> gpd
>
>
Thanks, my bad; however, my excuse is there was no indication in the
passages which I cited that exceptions are propagated. OTOH,
prompted by your reply, I looked at:

http://www.boost.org/doc/libs/1_52_0/doc/html/boost/variant.html#id1244408-bb

which does indicate that operator= propagates exceptions:

  may fail with any exceptions arising from the assignment of the
  content of rhs into the content *this.

Sorry for noise :(

-regards,
Larry


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