libstdc++/9213: vect.size() doesn't work proper
kristof@sources.redhat.com
kristof@sources.redhat.com
Mon Jan 13 05:17:00 GMT 2003
>Number: 9213
>Category: libstdc++
>Synopsis: vect.size() doesn't work proper
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 07 00:46:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: kristof.taveirne@rug.ac.be
>Release: 3.2
>Organization:
>Environment:
>Description:
std::cout << vect.size()<< std::endl;
std::cout << vect.size()<< std::endl;
gives 2 different sizes when called right after eachother.
The second time it equals vect.capacity();
vect.size() should not change the size of the vector, since no items are added to it.
>How-To-Repeat:
create empty vector, and write out the size twice after each other. it's behaviour is very akward, it sometimes does it correctly.
>Fix:
.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list