From Jason Turner

[mem.poly.allocator.mem]

Diff to HTML by rtfpessoa

tmp/tmpe7vxc_2j/{from.md → to.md} RENAMED
@@ -66,11 +66,11 @@ template<class T>
66
  ```
67
 
68
  *Effects:* Equivalent to `deallocate_bytes(p, n*sizeof(T), alignof(T))`.
69
 
70
  ``` cpp
71
- template<class T, class CtorArgs...>
72
  [[nodiscard]] T* new_object(CtorArgs&&... ctor_args);
73
  ```
74
 
75
  *Effects:* Allocates and constructs an object of type `T`, as follows.
76
  Equivalent to:
@@ -95,11 +95,11 @@ template<class T>
95
  ```
96
 
97
  *Effects:* Equivalent to:
98
 
99
  ``` cpp
100
- destroy(p);
101
  deallocate_object(p);
102
  ```
103
 
104
  ``` cpp
105
  template<class T, class... Args>
@@ -114,17 +114,10 @@ template<class T, class... Args>
114
  represented by `p` by uses-allocator construction with allocator `*this`
115
  and constructor arguments `std::forward<Args>(args)...`.
116
 
117
  *Throws:* Nothing unless the constructor for `T` throws.
118
 
119
- ``` cpp
120
- template<class T>
121
- void destroy(T* p);
122
- ```
123
-
124
- *Effects:* As if by `p->T̃()`.
125
-
126
  ``` cpp
127
  polymorphic_allocator select_on_container_copy_construction() const;
128
  ```
129
 
130
  *Returns:* `polymorphic_allocator()`.
 
66
  ```
67
 
68
  *Effects:* Equivalent to `deallocate_bytes(p, n*sizeof(T), alignof(T))`.
69
 
70
  ``` cpp
71
+ template<class T, class... CtorArgs>
72
  [[nodiscard]] T* new_object(CtorArgs&&... ctor_args);
73
  ```
74
 
75
  *Effects:* Allocates and constructs an object of type `T`, as follows.
76
  Equivalent to:
 
95
  ```
96
 
97
  *Effects:* Equivalent to:
98
 
99
  ``` cpp
100
+ allocator_traits<polymorphic_allocator>::destroy(*this, p);
101
  deallocate_object(p);
102
  ```
103
 
104
  ``` cpp
105
  template<class T, class... Args>
 
114
  represented by `p` by uses-allocator construction with allocator `*this`
115
  and constructor arguments `std::forward<Args>(args)...`.
116
 
117
  *Throws:* Nothing unless the constructor for `T` throws.
118
 
 
 
 
 
 
 
 
119
  ``` cpp
120
  polymorphic_allocator select_on_container_copy_construction() const;
121
  ```
122
 
123
  *Returns:* `polymorphic_allocator()`.