Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.96 KB

README.md

File metadata and controls

50 lines (32 loc) · 1.96 KB

Ouroboros

build-and-test

Ouroboros is a C++ header only library containing a cyclic deque, otherwise known as a circular buffer, ring buffer, etc. The cyclic deque, named ouroboros::cyclic_deque<>, describes a sequence container with the first and last element of the sequence seemingly connected end-to-end. A deque (double-ended queue) allows fast insertion and deletion at both its beginning and end.

The library is named after the symbol depicting a serpent or dragon that eats its own tail and it represents the infinite amount of times a circular buffer has been implemented in code throughout history.

Available under the MIT license.

Capabilities

  • The capacity of the container can be set at run-time.
  • Fast insertion and deletion at both its beginning and end.
  • STL compliant. Provides the interface of a random access range.

Examples

Requirements

Minimum:

  • A compiler that is compliant with the C++17 standard or higher.
  • CMake. It is also possible to just copy and paste the ouroboros directory into an include directory.

Optional:

Build

Build with CMake:

$ mkdir build && cd build
$ cmake ../
$ cmake --build .
$ cmake --build . --target ouroboros_doc
$ cmake --install .
find_package(Ouroboros REQUIRED)

add_executable(myexe main.cpp)
target_link_libraries(myexe PUBLIC Ouroboros::Ouroboros)