Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-03-23 11:58:36

On Sun, 23 Mar 2003 17:17:03 +0100, Gennaro Prota
<gennaro_prota_at_[hidden]> wrote:

>the standard defines 'stack unwinding' as (15.2/3)
> The process of calling destructors for automatic objects
> constructed on the path from a try block to a throw-expression
>Does this include the 'argument' of the call expression?
> throw A()
>Certainly the expression A() is part of the throw-expression, however
>the quote above isn't particularly clear at saying whether "to a
>throw-expression" is inclusive or not.

Now that I think about it, I believe the initial copy of the exception
object must logically be seen as a *part* of the evaluation of the
throw-expression. Otherwise, i.e. if you make it a separate step, you
either have to say that the temporary A() is not destroyed at the end
of its full expression (the throw) or say that it is destroyed before
you get a chance to copy it to a safe place. Don't you agree?


Boost list run by bdawes at, gregod at, cpdaniel at, john at