vector<> can probably never grow to it's maximum size!

Paolo Carlini pcarlini@suse.de
Wed Oct 20 16:42:00 GMT 2004


Dhruv Matani wrote:

>>In my opinion, you cannot *always* consider growing 1-item-at-a-time only
>>because ::operator new throws. As I already told you, from the point of view
>>of the user, that knows nothing about memory and so on, the vector is 
>>growing slowly and since you are catching the exceptions he cannot know why.
>>    
>>
>Hmmm. The user may also start wondering why the vector is performing so
>many copies.
>
Which copies?

Paolo.



More information about the Libstdc++ mailing list