Skip to content

A C++ header only library containing a cyclic deque, aka a circular buffer, that supports fast insertion and deletion at both its beginning and end.

License

Notifications You must be signed in to change notification settings

Jaybro/ouroboros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A C++ header only library containing a cyclic deque, aka a circular buffer, that supports fast insertion and deletion at both its beginning and end.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published