public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/7974: cannot reference an element of a vector in a class object from an iterator for a vector of such objects (the -> operator fails)
@ 2002-10-31 12:39 paolo
  0 siblings, 0 replies; only message in thread
From: paolo @ 2002-10-31 12:39 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nixonj, nobody, paolo

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

Synopsis: cannot reference an element of a vector in a class object from an iterator for a vector of such objects (the -> operator fails)

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Thu Oct 31 12:39:09 2002
Responsible-Changed-Why:
    Triaged.
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Thu Oct 31 12:39:09 2002
State-Changed-Why:
    User error.
    In test::init you need 'resize' NOT 'reserve': only the former changes the size of the vector, whereas the latter
    its capacity. Definitely, before *assigning* the elements
    of the vector you need it to have two elements, *not* just
    having it allocated raw memory capacity  to grow to a
    maximum size of two without reallocations.
    I suggest reading C++PLSE, §16.3.8.
    
    Thanks for your report, Paolo. 

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7974


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-31 20:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-31 12:39 libstdc++/7974: cannot reference an element of a vector in a class object from an iterator for a vector of such objects (the -> operator fails) paolo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).