[09_queue] default constructor should be deleted.

This commit is contained in:
Liam Huang 2018-10-10 21:45:23 +08:00
parent 8e7d064f8f
commit 29c9ffc9c5

View File

@ -14,7 +14,7 @@ class ArrayQueue {
size_t tail_ = 0;
public:
ArrayQueue() = default;
ArrayQueue() = delete;
ArrayQueue(size_t capacity) : capacity_(capacity) {
items_ = new T[capacity];
}