Marc said:
It is rather obvious. Let me illustrate it by an example: when x86 was a
16 bit platform, certain C/C++ compilers used 16 bit unsigned integer
type as 'size_t'. That still didn't mean that numer of elements in
'std::list<>' was limited by 2^16. In that case the size of a single
elmement was limited by 2^16, but the maxumum length of the list was
only limited by the available memory.
The important thing is that no one/nothing says that size of a container
should be limited by the range of 'size_t'.
Each container is allowed to have its own 'size_type'. If you are
designing a container, choose the appropriate type to represent is size.
If you are using a container, use its 'size_type' to hold the
container's size.