|
Boost : |
Subject: Re: [boost] devector feedback request
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2015-07-26 17:51:53
Benedek Thaler wrote:
> I'd like to avoid having too many policies. One could argue, that the chosen size type limits the maximum growth, thus it fits into the concept of the GrowthPolicy. I'll think on it.
Sounds good.
> It looks like the container uses allocator<X>, but really, it uses
> allocator<Y>, which is not nice. Or maybe it's just me being too strict.
I'm also undecided:
- On the one hand, requiring that explicit specification of allocator
type whose value_type matches the desired value_type is nice.
- On the other, it's a little repetitive: we already specify
value_type in the parameter list, and every allocator type provides a
mechanism to rebind for a given value_type. It may also feel a little
inconsistent: e.g. with Clang/libc++ the above example with
std::vector static_asserts, yet { std::list<int, std::allocator<void>
> l; l.push_back(1); } will compile fine.
> Unfortunately, I have no benchmarks to prove it, yet.
Benchmarks comparing against std::vector would be nice to have
(whenever you have time).
Best,
Glen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk