C++ version of RingBuffer added