#include /** * @brief Set of tools to manipulate vector stacks. */ namespace Stack { template bool isEmpty(const std::vector& stack) { return stack.empty(); }; // template // bool isFull(std::vector& stack) { // return !stack->empty(); // }; template void put(std::vector& stack, const type& item) { stack.push_back(item); } template type take(std::vector& stack) { if (stack.size() == 0) throw "a"; type toReturn = stack.back(); stack.pop_back(); return toReturn; } namespace oper { template void add(std::vector& stack) { take(stack); // put(take(stack)+) } } }; // namespace stack