]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: bitset_set and mini_flat_map 61753/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Tue, 11 Feb 2025 10:51:40 +0000 (10:51 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Fri, 7 Mar 2025 08:52:46 +0000 (08:52 +0000)
commit32d57d7713250c58a85b2ac094f0bfee429f2fc4
tree8a5b9b23512b1c38e4b1057daf0c0d4d490593fe
parentf6b94540651a75b9167704959eabb83f1b420f0c
common: bitset_set and mini_flat_map

The bitset_set is compile-time-fixed size bitmap, which can be accessed using a std::set-like iterator.

The mini_flat_map is similar to a boost::flat_map, except with more restrictions on the size and key, allowing it to make
better use of vectors.

Both have the restriction that the key must be unambiguously castable to/from a small integer. The mini_flat_map has the additional restriction, that the size must be known at construction time.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/common/bitset_set.h [new file with mode: 0644]
src/common/mini_flat_map.h [new file with mode: 0644]
src/test/common/CMakeLists.txt
src/test/common/test_bitset_set.cc [new file with mode: 0644]
src/test/common/test_mini_flat_map.cc [new file with mode: 0644]