feat add circle_queue

This commit is contained in:
tqcq 2024-02-24 16:28:13 +08:00
parent f11904132f
commit e3fd80811a

View File

@ -37,6 +37,12 @@ public:
return queue_.get(head_);
}
T &Back()
{
ASSERT(!empty());
return queue_.get((tail_ + LEN) % (LEN + 1));
}
void Pop()
{
ASSERT(!empty());