libstdc++: std::default_delete< _Tp > Struct Template Reference

libstdc++

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
constexpr void | operator() (_Tp *__ptr) const

## Detailed Description

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

Primary template of default_delete, used by unique_ptr for single objects

Since
  C++11

Definition at line 68 of file unique_ptr.h.

## Constructor & Destructor Documentation

## ◆ default_delete() [1/2]

template<typename _Tp>

std::default_delete< _Tp >::default_delete | ( |  | ) |
| constexprdefaultnoexcept

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 > & |  | ) |
| inlineconstexprnoexcept

Converting constructor.

Allows conversion from a deleter for objects of another type, _Up, only if _Up* is convertible to _Tp*.

Definition at line 81 of file unique_ptr.h.

References default_delete().

## Member Function Documentation

## ◆ operator()()

template<typename _Tp>

void std::default_delete< _Tp >::operator() | ( | _Tp * | __ptr | ) | const
| inlineconstexpr

Calls delete __ptr

Definition at line 86 of file unique_ptr.h.

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

- unique_ptr.h