mlib icon indicating copy to clipboard operation
mlib copied to clipboard

Add EMPLACE_TYPE support for B+TREE, DICT, RB-TREE, BUFFER, CONCURRENT

Open P-p-H-d opened this issue 2 years ago • 3 comments

Add basic & naive implementation of emplace* functions for:

  • B+TREE (both set & map)
  • DICT,
  • RB-TREE,
  • BUFFER,
  • CONCURRENT

P-p-H-d avatar Jul 30 '22 02:07 P-p-H-d

Done for RB Tree

P-p-H-d avatar Aug 08 '22 22:08 P-p-H-d

The main problem for the remaining emplace functions is to find how to name the emplace function:

  • from the set of emplace functions of the key (empty, suffix1a, ...)
  • from the set of emplace functions of the value (empty, suffix1b, ...) how to name the emplace function so that it is natural to read and without any ambiguity?

name_emplace_suffix1b_on_suffix1a(container, value, key) may be natural english but the order of the arguments are different than name_set_at(container, key, value) and C++ emplace

See also https://cplusplus.com/reference/vector/vector/emplace/

P-p-H-d avatar Aug 13 '22 23:08 P-p-H-d

I'll probably go on with "name_key_emplace_suffix1a_val_suffix1b" with suffix1a being the key and suffix1b the value even if it is not perfect.

P-p-H-d avatar Aug 27 '22 22:08 P-p-H-d