mirror of
https://github.com/boostorg/beast.git
synced 2025-08-04 07:14:32 +02:00
Remove unintended public members of handler_ptr
This commit is contained in:
@@ -3,6 +3,10 @@ Version 146:
|
|||||||
* Fix some typos
|
* Fix some typos
|
||||||
* Faster ascii_tolower
|
* Faster ascii_tolower
|
||||||
|
|
||||||
|
API Changes:
|
||||||
|
|
||||||
|
* Remove unintended public members of handler_ptr
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Version 145:
|
Version 145:
|
||||||
|
@@ -41,6 +41,10 @@ namespace beast {
|
|||||||
associated with the final handler is used to create the managed
|
associated with the final handler is used to create the managed
|
||||||
object.
|
object.
|
||||||
|
|
||||||
|
@par Thread Safety
|
||||||
|
@e Distinct @e objects: Safe.@n
|
||||||
|
@e Shared @e objects: Unsafe.
|
||||||
|
|
||||||
@note The reference count is stored using a 16 bit unsigned
|
@note The reference count is stored using a 16 bit unsigned
|
||||||
integer. Making more than 2^16 copies of one object results
|
integer. Making more than 2^16 copies of one object results
|
||||||
in undefined behavior.
|
in undefined behavior.
|
||||||
@@ -145,22 +149,12 @@ public:
|
|||||||
return p_->handler;
|
return p_->handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if `*this` owns an object.
|
|
||||||
explicit
|
|
||||||
operator bool() const
|
|
||||||
{
|
|
||||||
return p_ && p_->t;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Returns a pointer to the owned object.
|
/** Returns a pointer to the owned object.
|
||||||
|
|
||||||
If `*this` owns an object, a pointer to the
|
|
||||||
object is returned, else `nullptr` is returned.
|
|
||||||
*/
|
*/
|
||||||
T*
|
T*
|
||||||
get() const
|
get() const
|
||||||
{
|
{
|
||||||
return p_ ? p_->t : nullptr;
|
return p_->t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a reference to the owned object.
|
/// Return a reference to the owned object.
|
||||||
@@ -179,7 +173,13 @@ public:
|
|||||||
|
|
||||||
/** Release ownership of the handler
|
/** Release ownership of the handler
|
||||||
|
|
||||||
If `*this` owns an object, it is first destroyed.
|
Requires: `*this` owns an object
|
||||||
|
|
||||||
|
Before this function returns,
|
||||||
|
the owned object is destroyed, satisfying the
|
||||||
|
deallocation-before-invocation Asio guarantee. All
|
||||||
|
instances of @ref handler_ptr which refer to the
|
||||||
|
same owned object will be reset, including this instance.
|
||||||
|
|
||||||
@return The released handler.
|
@return The released handler.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user