|
Boost : |
Subject: Re: [boost] Proposal: Monotonic Containers
From: Christian Schladetsch (christian.schladetsch_at_[hidden])
Date: 2009-06-10 04:42:38
Hi Peter,
I much prefer using a standard template library container to any other, even
> if it's the same thing but different. I would therefore much prefer the
> std::map<int, float, std::less<int>, ...> approach to creating another
> container; especially as this one can also take a different comparison
> operator.
Yes, but what about
boost::monotonic::inline_storage<N> storage;
std::map<int, float, std::less<int>, boost::monotonic::allocator<int> >
v(boost::monotonic::allocator<int>(storage));
versus:
boost::monotonic::inline_storage<N> storage;
boost::monotonic::map<int, float> v(storage);
My rationale is that when I want a vector with a different allocation
> scheme, I like to say "vector with a different allocation scheme" rather
> than "differently-allocated not-quite-a-std::vector".
I grok that; but boost::monotonic::container also is-a std::container with
guranteed no extra junk. They are absolutely %100 type-compatible after
creation.
Regards,
Christian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk