Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards



The basic motivation behind the circular_buffer was to create a container which would work seamlessly with STL.

Additionally, the design of the circular_buffer was guided by the following principles:

In order to achieve maximum efficiency, the circular_buffer and circular_buffer_space_optimized store their elements in a contiguous region of memory, which then enables:

Possible applications of the circular buffer include: