aboutsummaryrefslogtreecommitdiff
path: root/include/Stack.hpp
blob: 64bfc663805712e466ef5516e126ea6f6016ce17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef STACK_HPP
# define STACK_HPP

# include "vector.hpp"

namespace ft
{
	template <class T, class Container = deque<T> >
	class stack : public vector
	{
	public:
		explicit stack (const container_type& ctnr = container_type());
		value_type& top()
		{
			return back();
		}
		void push (const value_type& val)
		{
			push_back(val);
		}
		void pop()
		{
			pop_back();
		}
	};
}

#endif