Propagating exceptions from destructors with std::exception_ptr
🫧 Open on Bubbles A few weeks ago, I wrote about what happens when a destructor actually throws and why it is a dangerous idea. One of the readers commented that he was once in a situation where he had to propagate an exception from a destructor. But as a destructor cannot safely throw and it also cannot return any value, he needed a better solution. And that solution was std::exception_ptr. Let’s look into wh...
评论
?
参与讨论