Collection of common data structures
- header-only library
- designed for small embedded system
- no dynamic memory allocation (
malloc
,new
, ...) - no code depends on STL
- all test cases pass on AVR microcontroller (emulated with QEMU)
- no dynamic memory allocation (
- generic data structures:
- Queue
- Stack
- Buffer
- List
- Tree (v0.5.0~)
You can install collection2 by some ways.
1. install as dependency of your project (using FetchContent of CMake)
Add the following to your CMakeLists.txt
:
# Fetch library
include(FetchContent)
FetchContent_Declare(
collection2
GIT_REPOSITORY https://github.com/Enchan1207/collection2
GIT_TAG v0.6.0
)
FetchContent_MakeAvailable(collection2)
# assume target name is main
add_executable(main)
target_sources(main
...
)
# Include directories are automatically set when linking
target_link_libraries(main PRIVATE
collection2
)
After clone this repository, exec commands shown below. To exec these commands, the library will be installed on your system.
mkdir build
cd build
cmake ..
cmake --build .
ctest
cmake --install .
Latest document is hosted on GitHub Pages.
This repository is published under MIT License.