Boost logo

Boost :

Subject: Re: [boost] [Container] Provide more guarantees for flat_multimap
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2014-08-18 22:33:48


On 18/08/2014 22:47, Niall Douglas wrote:
> On 17 Aug 2014 at 17:06, Lars Viklund wrote:
>
>>>> * A new std::pair<iterator, bool> insert_ct(node_ptr_type &&v)
>>>> inserts only if no new memory would be allocated. This is highly
>>>> valuable for low latency use.
>>>
>>> The _ct suffix is a bit obscure (as in "I have no idea what it means.")
>>> Alternatively you could use a tag argument on an overloaded insert()
>>> to specify the memory-allocation policy.
>>
>> After thinking way too hard for a bit, I'd reckon it stands for
>> "constant time". I would not have deciphered it without the "low
>> latency" and "no allocation" hints.
>
> It does.
>
> I like the idea of a noalloc_t tag, so insert(noalloc_t,
> node_ptr_type &&v). Thoughts?

Shouldn't tags traditionally be the final argument?


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