Boost logo

Boost :

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


On Sun, 23 Mar 2003 08:11:02 -0500, David Abrahams
<dave_at_[hidden]> wrote:

>Gennaro Prota <gennaro_prota_at_[hidden]> writes:

>> - "Don't embed a std::string object or any other data member or base
>> class whose copy constructor could throw an exception. That could lead
>> to termination during stack unwinding."
>>
>> I think you meant *before* (any) stack unwinding (unless you are
>> thinking to catch by value, but that's highly unlikely)
>
>I don't actually know whether it's before or after, but it's at the
>stage described by 15.1/3, so I'll clarify that.

Hmmm... let's ignore the possibility to omit the copy for a moment:
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.

I'm inclined to think that it is inclusive, in principle. Maybe you
know something, from the committee meetings or from the standard, that
contradicts this view?

> [...]
>I just copied the official reference text, and never knew where that
>number came from. Is it really a volume number?

So I guess :-) The linked to page has, at its bottom, the following

    "Series: Lecture Notes in Computer Science. Volume. 1766"

That's itself a link and if you follow it you find a long list with
one of the entries being

    "Volume. 1766: Jazayeri, M.; Loos, R. G.K.; Musser, D. R.,
    (Eds.) Generic Programming"

>Thanks for your remarks!

Thanks to you :-)

Genny.


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