Advertisement
Guest User

Untitled

a guest
Mar 4th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. 20.7.1.1
  2. 20.7.1.1.1
  3. 1
  4. 2
  5. Default deleters
  6. In general
  7. [unique.ptr.dltr]
  8. [unique.ptr.dltr.general]
  9. The class template default_delete serves as the default deleter (destruction policy) for the class template
  10. unique_ptr.
  11. The template parameter T of default_delete may be an incomplete type.
  12. 20.7.1.1.2 default_delete
  13. [unique.ptr.dltr.dflt]
  14. namespace std {
  15. template <class T> struct default_delete {
  16. constexpr default_delete() noexcept = default;
  17. template <class U> default_delete(const default_delete<U>&) noexcept;
  18. void operator()(T*) const;
  19. };
  20. }
  21. template <class U> default_delete(const default_delete<U>& other) noexcept;
  22. 1 Effects: Constructs a default_delete object from another default_delete<U> object.
  23. 2 Remarks: This constructor shall not participate in overload resolution unless U* is implicitly convertible
  24. to T*.
  25. void operator()(T *ptr) const;
  26. 3 Effects: calls delete on ptr.
  27. 4 Remarks: If T is an incomplete type, the program is ill-formed.
  28. ยง 20.7.1.1.2
  29. 514
  30. c ISO/IEC
  31. 20.7.1.1.3
  32. N3337
  33. default_delete<T[]>
  34. [unique.ptr.dltr.dflt1]
  35. namespace std {
  36. template <class T> struct default_delete<T[]> {
  37. constexpr default_delete() noexcept = default;
  38. void operator()(T*) const;
  39. template <class U> void operator()(U*) const = delete;
  40. };
  41. }
  42. void operator()(T* ptr) const;
  43. 1 Effects: calls delete[] on ptr.
  44. 2 Remarks: If T is an incomplete type, the program is ill-formed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement