This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: About std::vector::resize().


On Wed, May 26, 2004 at 08:41:10PM +0530, Dhruv Matani wrote:
> On Tue, 2004-05-25 at 18:32, Carlo Wood wrote:
> > As far as I know this is implementation dependend and using swap
> > would be allowed (or so I was told not long ago).
> 
> How long ago, and where? Was this issue discussed somewhere else?

Oh, a week or so ago - I ran into a bug in a library of me because
I had not realized that vector<>::resize calls copyconstructors
and destructors on the elements when it relocates it contents.
This was on a C++ IRC channel.

> Ok, fine! I was confused about whether the standard allowed it or not.

I am not a language lawyer, nor are the people that told me it
was implementation dependend.  You'll have to ask someone else :).

-- 
Carlo Wood <carlo@alinoe.com>


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