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? It's a shame there isn't a std::noalloc_t yet. An obtuse alternative could be: insert(const time_t, node_ptr_type &&v); ... but that is indeed obtuse. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/