This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/9213: vect.size() doesn't work proper
- From: kristof at sources dot redhat dot com, taveirne at sources dot redhat dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 7 Jan 2003 08:39:25 -0000
- Subject: libstdc++/9213: vect.size() doesn't work proper
- Reply-to: kristof at sources dot redhat dot com, taveirne at sources dot redhat dot com
>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: