Boost logo

Boost :

From: Ed Brey (edbrey_at_[hidden])
Date: 2001-08-20 09:39:49


From: "Peter Dimov" <pdimov_at_[hidden]>
> [Mandatory initialization of vector elements]
>
> People often cite this as a problem with std::vector and propose (good)
> solutions. Since I don't think that this is a problem, I don't want it
> "fixed." :-) As long as the vector uses memset() whenever possible, of
> course.

I agree with you that the vector semantics aren't a problem per se. The invariant that stems from the initialization semantic keeps the interface nice and simple. The question is: how should one program algorithms that need deferred initialization of elements? If vector is to be the end all and do all dynamic array type, replacing VLAs et al., it needs to answer this question. Could you elaborate on what you have in mind?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk