19 Aug
2014
19 Aug
'14
2:33 a.m.
On 18/08/2014 22:47, Niall Douglas wrote:
On 17 Aug 2014 at 17:06, Lars Viklund wrote:
* A new std::pair
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?