Documentation Home >> Headers >> <jss/experimental_atomic.hpp> Header >> std::experimental::shared_ptr >> std::experimental::shared_ptr::reset member function with a value, deleter and allocator

Constructs a new std::experimental::shared_ptr instance that owns the supplied value and deleter and allocator assigns it to *this. Decreases the use_count() for the old value if any.

template<typename Target,typename Deleter,typename Allocator>
void reset(Target* p,Deleter d,Allocator a);

Preconditions:

Target* is implicitly convertible to T*. d(p) is well-formed. Deleter is CopyConstructible

Effects:
template<typename Target,typename Deleter,typename Allocator>
void reset(Target* p,Deleter d,Allocator a){
    shared_ptr temp(p,d,a);
    this->swap(temp);
}
Header

#include <experimental/atomic>

See Also