C++ implementation of a cyclic queue.