| 43 | } |
| 44 | |
| 45 | void push_back(const T & value) { |
| 46 | if (sz == capacity) { |
| 47 | // advance the start when buffer is full |
| 48 | first = (first + 1) % capacity; |
| 49 | } else { |
| 50 | sz++; |
| 51 | } |
| 52 | data[pos] = value; |
| 53 | pos = (pos + 1) % capacity; |
| 54 | } |
| 55 | |
| 56 | T pop_front() { |
| 57 | if (sz == 0) { |
no outgoing calls
no test coverage detected