/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* MutantStack.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/01/14 17:17:11 by bchanot #+# #+# */ /* Updated: 2026/01/14 19:17:32 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef MUTANTSTACK_HPP # define MUTANTSTACK_HPP # include # include #include #include #include template < typename T, typename Container = std::deque > class MutantStack : public std::stack { public: MutantStack() : MutantStack::stack() {}; MutantStack( MutantStack const & src ) : MutantStack::stack(src) {}; virtual ~MutantStack() {}; MutantStack &operator=( MutantStack const & rhs ) { if (this != &rhs) this->MutantStack::stack::operator=(rhs); return *this; } typedef typename Container::iterator iterator; typedef typename Container::reverse_iterator reverse_iterator; typedef typename Container::const_iterator const_iterator; typedef typename Container::const_reverse_iterator const_reverse_iterator; iterator begin() { return this->c.begin(); }; const_iterator begin() const { return this->c.begin(); }; iterator end() { return this->c.end(); }; const_iterator end() const { return this->c.end(); }; reverse_iterator rbegin() { return this->c.rbegin(); }; const_reverse_iterator rbegin() const { return this->c.rbegin(); }; reverse_iterator rend() { return this->c.rend(); }; const_reverse_iterator rend() const { return this->c.rend(); }; }; #endif /* ***************************************************** MUTANTSTACK_H */