But max_size probably returns the maximum number of elements that can be stored in this container. Since array is a fixed-size container I would guess that the resulf of array<T,N>::max_size() equals array<T,N>::size().
Sarath wrote: > From the documentaiton, I could not find any difference between these > functions.
> std::tr1::array - What's the difference between max_size and size?
STL containers in general provide both member functions. size() tells you how many elements there are currently in the container, and max_size() gives you an estimate of the maximum number of elements that you could put into the container.
> Sarath wrote: > > From the documentaiton, I could not find any difference between these > > functions.
> > std::tr1::array - What's the difference between max_size and size?
> STL containers in general provide both member functions. size() tells > you how many elements there are currently in the container, and > max_size() gives you an estimate of the maximum number of elements that > you could put into the container.