Lines Matching refs:iterator
47 class iterator : public std::iterator<std::forward_iterator_tag, T> {
49 iterator(T* ptr, size_t size, size_t pos, size_t ctr);
51 iterator& operator++();
53 iterator operator++(int);
55 bool operator==(const iterator& rhs);
57 bool operator!=(const iterator& rhs);
73 class const_iterator : public std::iterator<std::forward_iterator_tag, T> {
127 iterator begin();
132 iterator end();
177 RingBuffer<T>::iterator::iterator(T* ptr, size_t size, size_t pos, size_t ctr) : in iterator() function
181 typename RingBuffer<T>::iterator& RingBuffer<T>::iterator::operator++() {
194 typename RingBuffer<T>::iterator RingBuffer<T>::iterator::operator++(int) {
195 iterator tmp{mPtr, mSize, mPos, mCtr};
201 bool RingBuffer<T>::iterator::operator==(const iterator& rhs) {
206 bool RingBuffer<T>::iterator::operator!=(const iterator& rhs) {
211 T& RingBuffer<T>::iterator::operator*() {
216 T* RingBuffer<T>::iterator::operator->() {
304 typename RingBuffer<T>::iterator RingBuffer<T>::begin() { in begin()
306 return iterator(mBuffer.data(), mBuffer.size(), (mFrontIdx == 0) ? tmp : mFrontIdx - 1, 0); in begin()
310 typename RingBuffer<T>::iterator RingBuffer<T>::end() { in end()
312 return iterator(mBuffer.data(), s, s, s); in end()