7#ifndef DATA_STRUCTURES_STACK_HPP_
8#define DATA_STRUCTURES_STACK_HPP_
18template <
class ValueType>
21 using value_type = ValueType;
32 return push_all_to_vector(this->
stackTop.
get(), this->size);
36 void ensureNotEmpty()
const {
47 void push(
const value_type& item) {
56 value_type
top()
const {
for std::invalid_argument
Definition stack.hpp:19
std::size_t size
size of stack
Definition stack.hpp:77
bool isEmptyStack() const
Definition stack.hpp:44
void pop()
Definition stack.hpp:62
void clear()
Definition stack.hpp:69
void display() const
Definition stack.hpp:24
void push(const value_type &item)
Definition stack.hpp:47
value_type top() const
Definition stack.hpp:56
std::shared_ptr< Node< value_type > > stackTop
Definition stack.hpp:75
Provides Node class and related utilities.