General Utility Library for C++14  2.11
Containers

The General Utility Library provides several classes that can contain elements of other types.

Multi-Element Containers

SlidingBuffer: A circular data buffer of (semi-)fixed capacity to which elements can be added at the front or at the back.

SlidingBufferExposed: The same as SlidingBuffer, but with direct iterator access to the underlying buffer for maximum performance.

SmallVector: A resizable container with contiguous storage that can hold a specified number of elements without allocating memory on the heap.

Single-Element and Special-Purpose Containers

expected: A class template that can either contain a value of a certain (expected) type or an error value. It should behave like std::expected from C++23 for almost all use cases.

optional: A class template that can either contain a value of a certain type or not. It should behave like std::optional from C++17 for almost all use cases.

variant: Sometimes called a "type-safe union", a variant can hold a value of one of a specified set of types. Unlike a union, it can be queried for the type it is currently holding and ensures that only the stored type is accessed. The implementation should behave like std::variant from C++17.