1
template <class T> allocator {
2
T value_type; size_t size_type; ptrdiff_t difference_type;
3
pointer; const_pointer; reference; const_reference;
4
pinter address(reference r);
6
pointer allocate(size_type n, allocator<void)::const_pointer hint = 0);
7
void deallocate(pointer p, size_type n); // p is not destroyed
9
void construct(pointer p, const T& val); // p initialized by val
10
void destroy(pointer p); // destroy's p, but do not deallocate
15
struct rebind { typedef allocator<U> other; };
18
* allocator<void)::const_pointer is equivalent of const void *
19
* hint is implementation dependent. For example, an allocator might try to
20
allocate space for related object on the same page in a paging system.
21
* rebind is used to allow an allocator to allocate objects of arbitrary type
22
typedef A::rebind<string>::other string_alloc;
30
pair<T*, ptrdiff_t> get_temporary_buffer(ptrdiff_t n);
31
allocates 'n' or more objects of type 'T'. returns pointer to first
32
uninitialized space and the number of objects of type 'T' that will fit
34
void return_temporary_buffer(T*);
36
uninitialized_copy(first, last, Res); // copy into res
37
uninitialized_fill(first, last, val);
38
uninitialized_fill_n(firts, n, val);
b'\\ No newline at end of file'