Standard C++ Library Class Reference
template<class T, class U> typename types<T>::pointer
allocate (size_type,typename types<U>::const_pointer = 0);
template<class T> void deallocate( typename types<T>::pointer);
template<class T> size_type max_size () const;
template <class T1, class T2>
void construct (T1*, const T2&);
template <class T>
void destroy (T*)
};
// specialization
class allocator::types <void>
{
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
};
// globals
inline void * operator new (size_t, allocator&)
inline bool operator== (const allocator&, const allocator&)
Types
size_type
Type used to hold the size of an allocated block of storage.
difference_type
Type used to hold values representing distances between storage addresses.
types<T>::pointer
Type of pointer returned by allocator.
types<T>::const_pointer
Const version of pointer.
types<T>::reference
Type of reference to allocated objects.
const_reference
Const version of reference.
value_type
Type of allocated object.
Operations
allocator ()
Default constructor.
allocator ()
Destructor.
template <class T> typename types<T>::pointer
address (typename types<T>::reference x) const
Return the address of the reference x as a pointer.
template<class T> typename types<T>::const_pointer
address (typename types<T>::const_reference x) const;
Return the address of the reference x as a const_pointer.