Documentation Home >> Headers >> <jss/experimental_atomic.hpp> Header >> std::experimental::shared_ptr >> std::experimental::get_deleter non-member function

The get_deleter non-member function allows you to access the deleter associated with a std::experimental::shared_ptr instance if you know the type of the deleter.

template<typename T,typename Deleter>
Deleter* get_deleter(shared_ptr<T> const& p) noexcept;

Returns:

&d if p owns a deleter d of type Deleter, nullptr otherwise.

Throws:

Nothing.