Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 20.7.1.1
- 20.7.1.1.1
- 1
- 2
- Default deleters
- In general
- [unique.ptr.dltr]
- [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.7.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;
- 1 Effects: Constructs a default_delete object from another default_delete<U> object.
- 2 Remarks: This constructor shall not participate in overload resolution unless U* is implicitly convertible
- to T*.
- void operator()(T *ptr) const;
- 3 Effects: calls delete on ptr.
- 4 Remarks: If T is an incomplete type, the program is ill-formed.
- ยง 20.7.1.1.2
- 514
- c ISO/IEC
- 20.7.1.1.3
- N3337
- default_delete<T[]>
- [unique.ptr.dltr.dflt1]
- namespace std {
- template <class T> struct default_delete<T[]> {
- constexpr default_delete() noexcept = default;
- void operator()(T*) const;
- template <class U> void operator()(U*) const = delete;
- };
- }
- void operator()(T* ptr) const;
- 1 Effects: calls delete[] on ptr.
- 2 Remarks: If T is an incomplete type, the program is ill-formed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement