20 General utilities library [utilities]

20.11 Smart pointers [smartptr]

20.11.1 Class template unique_­ptr [unique.ptr]

20.11.1.1 Default deleters [unique.ptr.dltr]

20.11.1.1.1 In general [unique.ptr.dltr.general]

The class template default_­delete serves as the default deleter (destruction policy) for the class template unique_­ptr.
The template parameter T of default_­delete may be an incomplete type.

20.11.1.1.2 default_­delete [unique.ptr.dltr.dflt]

namespace std {
  template<class T> struct default_delete {
    constexpr default_delete() noexcept = default;
    template<class U> default_delete(const default_delete<U>&) noexcept;
    void operator()(T*) const;
  };
}
template<class U> default_delete(const default_delete<U>& other) noexcept;
Constraints: U* is implicitly convertible to T*.
Effects: Constructs a default_­delete object from another default_­delete<U> object.
void operator()(T* ptr) const;
Mandates: T is a complete type.
Effects: Calls delete on ptr.

20.11.1.1.3 default_­delete<T[]> [unique.ptr.dltr.dflt1]

namespace std {
  template<class T> struct default_delete<T[]> {
    constexpr default_delete() noexcept = default;
    template<class U> default_delete(const default_delete<U[]>&) noexcept;
    template<class U> void operator()(U* ptr) const;
  };
}
template<class U> default_delete(const default_delete<U[]>& other) noexcept;
Constraints: U(*)[] is convertible to T(*)[].
Effects: Constructs a default_­delete object from another default_­delete<U[]> object.
template<class U> void operator()(U* ptr) const;
Mandates: U is a complete type.
Constraints: U(*)[] is convertible to T(*)[].
Effects: Calls delete[] on ptr.