2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-02-17 13:52:14 +00:00

removed shared_ptr indirection from exception_wrapper

This commit is contained in:
Emil Dotchevski
2018-10-06 02:18:15 +02:00
parent 1dd286fc0d
commit fcf8a81ea6

View File

@@ -21,12 +21,11 @@ boost
class
exception_wrapper
{
std::shared_ptr<capture> cap_;
capture cap_;
std::exception_ptr original_exception_;
public:
explicit
exception_wrapper( std::exception_ptr && original_exception ):
cap_(std::make_shared<capture>()),
original_exception_(std::move(original_exception))
{
}
@@ -34,7 +33,7 @@ boost
void
rethrow_original_exception()
{
cap_->release();
cap_.release();
std::rethrow_exception(original_exception_);
}
};