Boost logo

Boost :

Subject: Re: [boost] [variant2] Andrzej's review
From: Rainer Deyke (rainerd_at_[hidden])
Date: 2019-04-14 16:32:27


On 13.04.19 17:33, Peter Dimov via Boost wrote:
> First off, the basic guarantee isn't worse than useless, it's the
> minimum standard that every non-broken component must meet, and everyone
> who argues otherwise isn't worth listening to.

I would say that the absolute minimum requirement is that all objects
are left destructible. It is not a requirement that all possible
operations on an object remain defined behavior - and there is plenty of
precedent for certain operations not being allowed on certain objects
even in the absence of exceptions. A variant without the never-empty
guarantee can meet that requirement, even if the empty state is an
exceptional state that can only be entered through an exception. There
may be valid arguments for a never-empty variant, but it is possible to
write correct code that recovers from exceptions even with an
exceptional-empty variant.

I'm not arguing against the basic exception guarantee per se. I am
arguing for an interpretation of the basic guarantee that allows for
exceptional states.

-- 
Rainer Deyke (rainerd_at_[hidden])

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