vector<> can probably never grow to it's maximum size!
Dhruv Matani
dhruvbird@gmx.net
Mon Oct 18 18:44:00 GMT 2004
On Mon, 2004-10-18 at 23:07, Paolo Carlini wrote:
> Dhruv Matani wrote:
>
> >>Also, I want to see nice testcases, with custom allocators.
> >>
> >>
> >??? Like showing what kind of behaviour?
> >
> >
> So, you are 100% sure that our std::vector *never* grows above max_size?
Yes, never! If at all it tries to pass a value > max_size, the
allocate() function would detect it, and throw up.
Unless of course, there is a wrapping around error in case(most
probable) in vector<char> because it seems most likely. I'll investigate
further before saying anything more.
> Paolo.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
The price of freedom is responsibility, but it's a bargain, because
freedom is priceless. ~ Hugh Downs
More information about the Libstdc++
mailing list