std::default_delete< _Tp[]> Struct Template Reference
Utilities » Memory » Pointer Abstractions

`#include <memory>`

## Public Member Functions

constexpr | default_delete () noexcept=default
template<typename _Up, typename = _Require<is_convertible<_Up(*)[], _Tp(*)[]>>>
constexpr | default_delete (const default_delete< _Up[]> &) noexcept
template<typename _Up>
constexpr enable_if< is_convertible< _Up(*)[], _Tp(*)[]>::value >::type | operator() (_Up *__ptr) const

## Detailed Description

template<typename _Tp>
struct std::default_delete< _Tp[]>

Specialization of default_delete for arrays, used by unique_ptr<T[]>

Since
  C++11

Definition at line 111 of file unique_ptr.h.

## Constructor & Destructor Documentation

## default_delete() [1/2]

template<typename _Tp>

std::default_delete< _Tp[]>::default_delete | ( |  | ) |

constexpr default noexcept

Default constructor.

Referenced by default_delete().

## default_delete() [2/2]

template<typename _Tp>
template<typename _Up, typename = _Require<is_convertible<_Up(*)[], _Tp(*)[]>>>

std::default_delete< _Tp[]>::default_delete | ( | const default_delete< _Up[]> & |  | ) |

inline constexpr noexcept

Converting constructor.

Allows conversion from a deleter for arrays of another type, such as a const-qualified version of _Tp.

Conversions from types derived from _Tp are not allowed because it is undefined to delete[] an array of derived types through a pointer to the base type.

Definition at line 129 of file unique_ptr.h.

References default_delete().

## Member Function Documentation

## operator()()

template<typename _Tp>
template<typename _Up>

enable_if< is_convertible< _Up(*)[], _Tp(*)[]>::value >::type std::default_delete< _Tp[]>::operator() | ( | _Up * | __ptr | ) | const

inline constexpr

Calls delete[] __ptr.

Definition at line 135 of file unique_ptr.h.

The documentation for this struct was generated from the following file:

- unique_ptr.h