| 50 | } |
| 51 | |
| 52 | void push_back(const T & value) { |
| 53 | if (sz == capacity) { |
| 54 | // advance the start when buffer is full |
| 55 | first = (first + 1) % capacity; |
| 56 | } else { |
| 57 | sz++; |
| 58 | } |
| 59 | data[pos] = value; |
| 60 | pos = (pos + 1) % capacity; |
| 61 | } |
| 62 | |
| 63 | T pop_front() { |
| 64 | if (sz == 0) { |
no outgoing calls
no test coverage detected