Typedefs


STL operates on a variety of memory architectures ranging from the old segmented 16-bit models to the more modern 32- and 64-bit architectures. STL does this by hiding the types that vary with the memory architecture behind a layer of typedefs . Each collection defines several typedefs . The following table lists the typedefs included in the collection definition.
 
Typedef Meaning

allocator_type

The type of allocator used to manage storage for the collection

const_reference

The type of a reference to a constant element of the collection

difference_type

The type that can represent the difference between any two pointers in the storage allocation model

reference

The type of a reference to an element of the collection

size_type

The type capable of holding the maximum number of elements permitted

value_type

The type of the object stored in the collection

The interface to all STL containers is defined using these typedefs .


Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.