Topic: STL vector copy ctor/assigment & reserve()


Author: kcoleman@cybercom.net (Kenneth Coleman)
Date: 1996/03/12
Raw View
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
]