forked from boostorg/beast
1 parent
72a99c43a7
commit
92ad50a8e7
6 files changed
+42
No files matched your search
@@ -39,6 +39,16 @@ operator=(saved_handler&& other) noexcept
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool
|
||||
saved_handler::
|
||||
reset() noexcept
|
||||
{
|
||||
if(! p_)
|
||||
return false;
|
||||
boost::exchange(p_, nullptr)->destroy();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
saved_handler::
|
||||
invoke()
|
||||
|
||||
@@ -90,6 +90,16 @@ public:
|
||||
void
|
||||
emplace(Handler&& handler);
|
||||
|
||||
/** Discard the saved handler, if one exists.
|
||||
|
||||
If `*this` contains an object, it is destroyed.
|
||||
|
||||
@returns `true` if an object was destroyed.
|
||||
*/
|
||||
BOOST_BEAST_DECL
|
||||
bool
|
||||
reset() noexcept;
|
||||
|
||||
/** Unconditionally invoke the stored completion handler.
|
||||
|
||||
Requires `this->has_value() == true`. Any dynamic memory
|
||||
|
||||
Reference in new issue
Block a user