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

 
This entry was posted in Uncategorized. Bookmark the permalink.