#pragma once #include #include /** * A stack data structure. */ template class Stack { public: /** * Creates a stack. * * @param capacity The capacity of the stack */ explicit Stack(const uint64_t &capacity); /** * Pushes a item onto the stack. */ void push(Item item); /** * Pops the topmost item from the stack. */ void pop(); /** * Peeks into the stack. * * @returns The topmost stack item. */ Item peek(); private: std::vector _items; }; #include "stack.tpp"