Subject: Re: [boost] [containers] Are there flat_map/set and stable_vector proposals at work?
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-10-28 20:48:22
On Oct 28, 2013, at 6:23 AM, Jonathan Wakely <jwakely.boost_at_[hidden]> wrote:
> On 28 October 2013 09:04, Rob Stewart wrote:
>> On Oct 27, 2013, at 8:32 AM, Jonathan Wakely <jwakely.boost_at_[hidden]> wrote:
>>> On 25 October 2013 20:44, Rob Stewart wrote:
>>>> A flat_map, backed by std::array, is quite possibly no faster than a normal C++11 map, with a suitable allocator. A C++03 map won't use its allocator for nodes, but IIRC, a C++11 map will.
>>> What do you mean by "use"?
>>> std::map has always allocated the memory for its nodes using its allocator.
>> 03's allocator interface means that the element and node allocations were done via different allocator types, which leads to distinct allocations. I don't recall the details, but that prevents using the same memory for both, as I recall.
> You're mistaken. The element has always been embedded in the node, so only the node is allocated.
I'm sure that's right, now that you say it. I can't think of the issue that's stuck in the back of my head. It's probably not relevant anyway. :)
(Sent from my portable computation engine)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk