You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.3 KiB

2 years ago
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* MutantStack.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/19 09:39:40 by narnaud #+# #+# */
/* Updated: 2022/09/19 09:39:45 by narnaud ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#include <iostream>
#include <stack>
template <class T> class MutantStack : public std::stack<T> {
public:
MutantStack<T>(void) {}
MutantStack<T>(const MutantStack<T> &st) { *this = st; }
~MutantStack<T>(void) {}
MutantStack<T> &operator=(const MutantStack<T> &st) {
(void)st;
return *this;
}
typedef typename std::stack<T>::container_type::iterator iterator;
iterator begin() { return this->c.begin(); }
iterator end() { return this->c.end(); }
};