rlogiacco / CircularBuffer

Arduino circular buffer library
GNU Lesser General Public License v3.0
312 stars 85 forks source link

Add range-loop based iterators #20

Closed sticilface closed 4 years ago

sticilface commented 5 years ago

Any chance of adding compatibility for c++11 range loops?

Id like to be able to iterate over the data using


for (auto & item : cirBuffer ) 
{
...
}

thanks

rlogiacco commented 5 years ago

You can submit a pull request containing the necessary changes, but as this library is intended for limited memory devices, watch out for any increment on program space or memory use: we strive for efficiency, not all around ease of use.

rlogiacco commented 4 years ago

Closing due to lack of feedback