]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
include/cpp-btree: adapt from abseil::btree
authorKefu Chai <kchai@redhat.com>
Tue, 14 Jan 2020 11:28:35 +0000 (19:28 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 15 Jan 2020 03:11:54 +0000 (11:11 +0800)
commit73f2d70fc8bdbb4a963483ded0487dd744def215
treec5b568ebd1ad41fd1430f3bcdda7ae2f07a20611
parentdbecfa03708514538d6dc3f34633da8fd5488a13
include/cpp-btree: adapt from abseil::btree

adapt based on btree implementation from Abseil Common Libraries.

with following changes:

* remove abseil dependencies. as abseil libraries do support C++11,
  they are written in C++11 compatible way. and use its homebrew
  alternatives for the facilities offered by C++14 and C++17. but
  Ceph is in C++17, so replace those facilities using the ones
  from the C++ standard library
* change `key_compare_to_adapter` to adapt to arithmetic types, and
  those who have `compare()` defined.
* move SlotPolicy into *_params types, simpler this way.
* continue using *_fields types. the layout facilities is nice. but
  we don't need this flexibility at this moment.
* continue using `empty_base_handle` for EBCO, CompressedTuple is
  nice, but it involves more dependencies which we don't want at
  this moment.
* node handle support is dropped. it's part of C++17 standard for
  node-based containers. we don't use it at this moment. but it's
  relatively simple if we want to add it back.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/cpp-btree/btree.h
src/include/cpp-btree/btree_container.h
src/include/cpp-btree/btree_map.h
src/include/cpp-btree/btree_set.h