|
Boost : |
Subject: Re: [boost] New library in the Vault: ConstantTimeSize
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-10-15 13:18:33
----- Original Message -----
From: "Mathias Gaunard" <mathias.gaunard_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, October 15, 2008 5:07 PM
Subject: Re: [boost] New library in the Vault: ConstantTimeSize
> vicente.botet wrote:
>
>> Boost.ConstantTimeSize defines a configurable wrapper to the stl
>> container list providing a size function with constant, linear or
>> quasy_constant complexity.
>
> I think a wrapper is not a good idea, since you cannot provide O(1) splice
> if splice is O(n).
You are right, we cannot wrap a splice O(n) and get a O(1). The main goal of
the library is to improve the list::size function.
> Why not providing a new policy-based std::list implementation?
Well this would be a interesting project, but on the project where I use it
I needed to interface with 3pp libraries having std::list as parameters. So
I needed to wrap them.
> Since you're at it, you might add full support for allocators, which
> containers do not have usually, allocator v2 support, move semantics,
> in-place insertion...
Thanks for the suggestion bau this is out of the scope of this mini library
;)
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk