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. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>