This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/9213: vect.size() doesn't work proper


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]