diff --git a/include/sled/queue/circle_queue.h b/include/sled/queue/circle_queue.h index 5cf41a8..06d7f67 100644 --- a/include/sled/queue/circle_queue.h +++ b/include/sled/queue/circle_queue.h @@ -37,6 +37,12 @@ public: return queue_.get(head_); } + T &Back() + { + ASSERT(!empty()); + return queue_.get((tail_ + LEN) % (LEN + 1)); + } + void Pop() { ASSERT(!empty());