Boost logo

Boost :

Subject: Re: [boost] Proposal: Vector-like container, which takes O(log(N)) for insert/erase (Glen Fernandes)
From: Lars Viklund (zao_at_[hidden])
Date: 2014-04-04 08:10:06


On Fri, Apr 04, 2014 at 02:42:51AM +0300, Alexander Kuprijanov wrote:
> Hi, again,
> I've implemented a container which should replace vector and have O(log(N))
> for insert/delete.

If it doesn't have contiguous storage, it's not a replacement for
vector, however much you want it to be the universal container that
everyone uses for everything.

It may be a better general-purpose container compared to the
usual default containers, deque and vector, but it isn't a replacement
for either of them.

You use the term 'intrusive' in the documentation, but it doesn't seem
to carry the usual meaning that it requires the types involved to
participate in the container structure.
Your tests doesn't seem to exercise much else than container<int>
either.

I'm not quite sure I like the explicit L/M non-type template parameters
either, considering that it leaks implementation detail into every
single user of the type.

As for the Copy-on-Write semantics, isn't the general consensus that CoW
is a horrible horrible thing and is very hard to get right+fast in the
modern world with concurrency?

-- 
Lars Viklund | zao_at_[hidden]

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