std::get_deleter
From cppreference.com
< cpp | memory | shared ptr
Defined in header <memory>
|
||
template< class Deleter, class T > Deleter* get_deleter( const std::shared_ptr<T>& p ) noexcept; |
(since C++11) | |
Access to the p's deleter. If the shared pointer p owns a deleter of type cv-unqualified Deleter
(e.g. if it was created with one of the constructors that take a deleter as a parameter), then returns a pointer to the deleter. Otherwise, returns a null pointer.
Contents |
[edit] Parameters
p | - | a shared pointer whose deleter needs to be accessed |
[edit] Return value
A pointer to the owned deleter or nullptr. The returned pointer is valid at least as long as there remains at least one