🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3644

STL vector copy ctor/assigment & reserve()

#3644
From: Kenneth Coleman
Date: Wed, 13 Mar 1996 04:15
21 lines
1579 bytes
I don't know if this is on purpose or not, but neither the copy
constructor nor the assignment operator appears to take into account
the fact that the function reserve() may have been called on the copy
source.  It basically makes the size of the vector into the number of
elements in the range [start, finish).

Is this on purpose, or is it a bug?  I can't find any mention of this
particular "feature" in the documentation I have, or in the working
paper.

Thanks for any help you can give me!

- Ken.
kcoleman@cybercom.net
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]
Technical Details
Message-ID: <4i0ilf$geh@orion.cybercom.net>
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern
From: kcoleman@cybercom.net (Kenneth Coleman)
Newsgroups: comp.std.c++
Subject: STL vector copy ctor/assigment & reserve()
Date: 12 Mar 1996 20:15:53 PST
Organization: Cyber Access Internet Services (617) 396-0491
Approved: austern@isolde.mti.sgi.com
Message-ID: <4i0ilf$geh@orion.cybercom.net>
NNTP-Posting-Host: isolde.mti.sgi.com
X-Original-Date: Mon, 11 Mar 1996 06:55:51 GMT
X-Newsreader: Forte Free Agent 1.0.82
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBVAwUBMUZMN0y4NqrwXLNJAQGp7QIAo70qOOfYc1KJjmvSDu6Gg0xaraPSGJbG
 ARs3DLwPFXdbWJFrYjWFV/kBOk/Tv5j6ADPZl6C4m9avzMlP3Oxsew==
 =A7Al
Originator: austern@isolde.mti.sgi.com