Boost logo

Boost :

Subject: Re: [boost] [exception] Lifetime of exception refered to byexception_ptr
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-05-13 12:26:49

Adam Badura:
>I failed to find in Boost.Exception documentation any note on how long is
>the lifetime of an exception object referred to by an exception_ptr. Also I
>failed to find it in the referred N2179
> It seems logical to assume that the lifetime is not shorter then the
> lifetime of any exception_ptr object referring to the exception object.
> N2179 suggests possibility of use of smart pointer as implementation of
> exception_ptr which makes that assumption even more justified.

The authoritative reference for exception_ptr is now the C++0x standard

which states in 18.8.5/7:

"The referenced object shall remain valid at least as long as there is an
exception_ptr object that refers to it."

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