Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/massimo-marino/circular-buffer

A C++17 implementation of a circular buffer
https://github.com/massimo-marino/circular-buffer

circular-buffer clang cpp cpp14 cpp17 cpp1z producer-consumer

Last synced: about 10 hours ago
JSON representation

A C++17 implementation of a circular buffer

Awesome Lists containing this project

README

        

# circular-buffer
C++17/20 implementation of a circular buffer

#### Requirements

`cmake` is used to compile the sources.

The cmake file compiles with `C++20`.

The unit tests are implemented in googletest: be sure you have installed googletest to compile.

#### Install

```bash
$ git clone https://github.com/massimo-marino/circular-buffer.git
$ cd circular-buffer
$ mkdir build
$ cd build
$ cmake ..
$ make
```

#### Run Unit Tests

```bash
$ cd src/unitTests
$ ./unitTests
```

#### Run Example

Remove `-DDO_LOGS` from `CMAKE_CXX_FLAGS` in the cmake file to see no logs printed at run-time.

```bash
$ cd ../example
$ ./circular-buffer-example
```