mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-31 13:17:23 +02:00
Add a self-assignment assert to reset(). Also add an overload of reset to
allow resetting to a new pointer with a new deletion function. [SVN r12491]
This commit is contained in:
@ -71,6 +71,7 @@ public:
|
||||
|
||||
void reset(T * p = 0)
|
||||
{
|
||||
BOOST_ASSERT(p == 0 || p != px);
|
||||
this_type(p).swap(*this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user