std::shared_ptr<T> _pop() { if(_data.empty()) throw EmptyQueueException(); std::shared_ptr<T> const res(std::make_shared<T>(_data.front())); _data.pop(); return res; }
int BoundedIntQueue::dequeue() { if (ourSize > 0) { if (front < capacity) { front++; ourSize--; return internalStorage[front - 1]; } else { front = 0; ourSize--; return internalStorage[capacity - 1]; } } else { throw EmptyQueueException(); } }