jnk0le / Ring-Buffer

simple C++11 ring buffer implementation, allocated and evaluated at compile time
MIT License
380 stars 64 forks source link

Implement iterator #19

Open aaarne opened 3 years ago

aaarne commented 3 years ago

It would be nice to have an iterator interface on the RingBuffer, then you can use the STL algorithms on the RingBuffer. All required for that is a begin and end method returning the iterators. You could then, for instance, sum up the values in the BufferEasily using std::accumulate.