The reason I'm asking is, that I once heard that
std::exception_ptr
is implemented in terms of reference counting [...]
Not necessarily, but it could be. Paragraph 18.8.5/6 of the C++11 Standard mentions this in a note:
typedef unspecified exception_ptr;
[...]
6 [ Note: An implementation might use a reference-counted smart pointer as
exception_ptr
. —end note ]
Therefore, you may not want to establish cycles of exception_ptr
.