You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -94,7 +94,7 @@ A pointer to the allocated object.
94
94
95
95
This member function is used by containers when compiled with a compiler that cannot compile rebind. It implements `_Charalloc` for the user-defined allocator by returning the result of a call to the `allocate` function of the synchronization filter.
This member function is used by containers when compiled with a compiler that cannot compile rebind. It implements `_Chardealloc` for the user-defined allocator by calling the `deallocate` function of the synchronization filter. The pointer ptr must have been earlier returned by a call to `_Charalloc` for an allocator object that compares equal to `*this`, allocating an array object of the same size and type. `_Chardealloc` never throws an exception.
115
115
116
-
## <a name="address"></a> allocator_base::address
116
+
## <a name="address"></a> allocator_base::address
117
117
118
118
Finds the address of an object whose value is specified.
119
119
@@ -136,7 +136,7 @@ A const or nonconst pointer to the object found of, respectively, const or nonco
136
136
137
137
This member function is implemented for the user-defined allocator by returning `&val`.
Allocates a block of memory large enough to store at least some specified number of elements.
142
142
@@ -162,7 +162,7 @@ A pointer to the allocated object.
162
162
163
163
The member function implements memory allocation for the user-defined allocator by returning the result of a call to the `allocate` function of the synchronization filter of type Type `*` if `_Nx == 1`, otherwise by returning the result of a call to `operator new(_Nx * sizeof(Type))` cast to type Type `*`.
The first constructor constructs an [allocator_base](../standard-library/allocator-base-class.md) instance. The second constructor constructs an `allocator_base` instance such that for any `allocator_base<Type, _Sync>` instance `a`, `allocator_base<Type, Sync>(allocator_base<Other, Sync>(a)) == a`.
This member function is implemented for the user-defined allocator by calling `deallocate(ptr)` on the synchronization filter `Sync` if `_Nx == 1`, otherwise by calling `operator delete(_Nx * ptr)`.
239
239
240
-
## <aname="destroy"></a> allocator_base::destroy
240
+
## <aname="destroy"></a> allocator_base::destroy
241
241
242
242
Calls an objects destructor without deallocating the memory where the object was stored.
243
243
@@ -255,15 +255,15 @@ void destroy(pointer ptr);
255
255
256
256
This member function is implemented for the user-defined allocator by calling `ptr->~Type()`.
Returns the number of elements of type `Type` that could be allocated by an object of class allocator before the free memory is used up.
269
269
@@ -279,31 +279,31 @@ The number of elements that could be allocated.
279
279
280
280
This member function is implemented for the user-defined allocator by returning `(size_t)-1 / sizeof(Type)` if `0 < (size_t)-1 / sizeof(Type)`, otherwise `1`.
281
281
282
-
## <aname="pointer"></a> allocator_base::pointer
282
+
## <aname="pointer"></a> allocator_base::pointer
283
283
284
284
A type that provides a pointer to the type of object managed by the allocator.
The static member function calls `al.construct(ptr, args...)`, if that expression is well formed; otherwise it evaluates `::new (static_cast<void *>(ptr)) Uty(std::forward<Types>(args)...)`.
0 commit comments