Boost logo

Boost :

Subject: Re: [boost] Proposal: Monotonic Containers
From: Cory Nelson (phrosty_at_[hidden])
Date: 2009-06-09 23:16:10


On Tue, Jun 9, 2009 at 6:48 PM, Christian
Schladetsch<christian.schladetsch_at_[hidden]> wrote:
> Hi Cory,
>
>
>> My largest complaint with C++ is that containers do not fit well with
>> high-perf low-overhead scenarios, so I'm very interested in seeing
>> something like this.
>>
>> I would want to see it taken a step further though.  Overhead can be a
>> big deal for large objects, so re-implementing string and vector
>> completely (so that you don't have the pointer/capacity specified
>> twice, in container & allocator) would be a welcome change.
>
>
> I don't think anyone doing high-performance code uses std::string. It is a
> nightmare, and similarly for std::vector, for the reasons you claim.
> However, re-writing these is not what I wish to do here...
>
>
>> Let the
>> user specify storage manually and throw if you go over it.
>
>
> That is precisely what my proposal does.
>
>
>> Make
>> default copying just copy the pointers around instead of all data.
>
>
> We can't lose value semantics for containers by default.

Where does the copy constructor get the new storage from?

-- 
Cory Nelson
http://int64.org

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