-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMutantStack.hpp
More file actions
38 lines (32 loc) · 1.54 KB
/
MutantStack.hpp
File metadata and controls
38 lines (32 loc) · 1.54 KB
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
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* MutantStack.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zelhajou <zelhajou@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/19 01:19:52 by zelhajou #+# #+# */
/* Updated: 2025/02/19 02:21:13 by zelhajou ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MUTANTSTACK_HPP
#define MUTANTSTACK_HPP
#include <stack>
#include <deque>
template <typename T>
class MutantStack : public std::stack<T>
{
public:
MutantStack() : std::stack<T>() {}
MutantStack(const MutantStack &other) : std::stack<T>(other) {}
virtual ~MutantStack() {}
MutantStack &operator=(const MutantStack &other) {
if (this != &other)
std::stack<T>::operator=(other);
return *this;
}
typedef typename std::stack<T>::container_type::iterator iterator;
iterator begin() { return this->c.begin(); }
iterator end() { return this->c.end(); }
};
#endif