| 71 | } |
| 72 | |
| 73 | std::vector<T> to_vector() const { |
| 74 | std::vector<T> result; |
| 75 | result.reserve(sz); |
| 76 | for (size_t i = 0; i < sz; i++) { |
| 77 | result.push_back(data[(first + i) % capacity]); |
| 78 | } |
| 79 | return result; |
| 80 | } |
| 81 | |
| 82 | void clear() { |
| 83 | // here only reset the status of the buffer |