|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
out_ptr_t::~out_ptr_t | ||||
| Non-member functions | ||||
~out_ptr_t(); | (since C++23) | |
Resets the adaptedSmart object by the value of modifiedPointer object (or thevoid* object ifoperatorvoid**() has been called) and the captured arguments.
Let
s denotes the adaptedSmart object,args... denotes the captured arguments,p denotes the value of storedPointer, orstatic_cast<Pointer>(*operatorvoid**()) ifoperatorvoid** has been called,SP bePointer.Ifs.reset(static_cast<SP>(p),std::forward<Args>(args)...) is well-formed, the destructor performs
otherwise, ifstd::is_constructible_v<Smart, SP, Args...> istrue, the destructor performs
otherwise, the program is ill-formed.
IfSmart is astd::shared_ptr specialization, the implementation may allocate the storage for the new control block on construction, in order to leave non-throwing works to the destructor.
Arguments captured by value are destroyed after resetting.