[libcxx-dev] exception_ptr reference counting
Eric Fiselier via libcxx-dev
libcxx-dev at lists.llvm.org
Mon Nov 18 19:11:35 PST 2019
The relevant implementation of exception_ptr is here (
The exception header is reference counted, my very quick and dirty reading
of the implementation suggests that we handle the reference counting
please let me know if I've overlooked something.
On Mon, Nov 18, 2019, 9:34 PM Shoaib Meenai via libcxx-dev <
libcxx-dev at lists.llvm.org> wrote:
> According to cppreference :
> > The exception object referenced by an std::exception_ptr remains valid
> as long as there remains at least one std::exception_ptr that is
> referencing it: std::exception_ptr is a shared-ownership smart pointer
> I don’t actually see any code in libc++’s implementation to prolong the
> lifetime of an exception object in case there are exception_ptrs pointing
> to it. I feel like I’m missing something obvious; how is this case handled?
>  https://en.cppreference.com/w/cpp/error/exception_ptr
> libcxx-dev mailing list
> libcxx-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libcxx-dev