#ifndef NALL_STACK_HPP #define NALL_STACK_HPP #include namespace nall { template struct stack : public linear_vector { void push(const T &value) { linear_vector::append(value); } T pull() { if(linear_vector::size() == 0) throw; T value = linear_vector::operator[](linear_vector::size() - 1); linear_vector::remove(linear_vector::size() - 1); return value; } T& operator()() { if(linear_vector::size() == 0) throw; return linear_vector::operator[](linear_vector::size() - 1); } }; } #endif