What’s the difference between max_size and size functions of std::tr1::array?

Well, I don’t know the answer. It’s not well documented. From the discussions went under comp.lang.C++ group, what I understood is that

STL containers in general provide both of these member functions. size() tells you how many elements there are currently in the container, and max_size() gives you an estimate of the maximum possible number of elements that you could put into the container.

As array is of having fixed number of elements, both functions acts similar and returns same value. Thanks Pete Becker

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

blog comments powered by Disqus