Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JGRennison/cpp-btree
Clone of Google's cpp-btree B-tree set and map containers, with minor fixes/modifications.
https://github.com/JGRennison/cpp-btree
Last synced: 16 days ago
JSON representation
Clone of Google's cpp-btree B-tree set and map containers, with minor fixes/modifications.
- Host: GitHub
- URL: https://github.com/JGRennison/cpp-btree
- Owner: JGRennison
- License: apache-2.0
- Created: 2014-02-19T20:11:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T21:25:15.000Z (3 months ago)
- Last Synced: 2024-08-21T23:29:33.839Z (3 months ago)
- Language: C++
- Size: 276 KB
- Stars: 33
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
Awesome Lists containing this project
- awesome-algorithms - cpp-btree - Google's cpp-btree B-tree set and map containers (Awesome Algorithms / B+ - B+Tree (B+树))
README
This library is a C++ template library and, as such, there is no
library to build and install. Copy the .h files and use them!See http://code.google.com/p/cpp-btree/wiki/UsageInstructions for
details.----
To build and run the provided tests, however, you will need to install
CMake, the Google C++ Test framework, and the Google flags package.Download and install CMake from http://www.cmake.org
Download and build the GoogleTest framework from
http://code.google.com/p/googletestDownload and install gflags from https://code.google.com/p/gflags
Set GTEST_ROOT to the directory where GTEST was built.
Set GFLAGS_ROOT to the directory prefix where GFLAGS is installed.export GTEST_ROOT=/path/for/gtest-x.y
export GFLAGS_ROOT=/optcmake . -Dbuild_tests=ON
For example, to build on a Unix system with the clang++ compiler,
export GTEST_ROOT=$(HOME)/src/googletest
export GFLAGS_ROOT=/opt
cmake . -G "Unix Makefiles" -Dbuild_tests=ON -DCMAKE_CXX_COMPILER=clang++----
Note that this is a modified version of the original at http://code.google.com/p/cpp-btree
Changes include:
- Changing size_type from ssize_t to size_t, remove remaining uses of ssize_t
- Adding cbegin, cend, crbegin, crend.
- Adding contains.
- Adding key_comp
- Adding move constructors/assignment.
- No longer #define NDEBUG if unset, this can clash with other headers, test for BTREE_DEBUG being defined instead
- Add noexcept to swap-based move constructors and copy/move assignment operator
- Remove use of deprecated std::allocator::rebind type
- Adding support for uncopyable/move-only map/multimap values (not keys).
- Fix ambiguous comparison operator warnings/errors when compiling with C++20.
- Use union to avoid strict aliasing violation in struct leaf_fields.
- Do not include IO stream headers or support dumping/operator<< if BTREE_NO_IOSTREAM is defined.CMakeLists-pthreads-fix.txt is a modified copy of CMakeLists.txt which includes -lpthreads when building the tests/benchmarks.
Using this instead fixes compilation on some platforms.