24 lines
565 B
C++
24 lines
565 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <stack>
|
|
#include <deque>
|
|
#include <algorithm>
|
|
|
|
template<typename T, class Container = std::deque<T> >
|
|
class MutantStack : public std::stack<T, Container> {
|
|
public:
|
|
MutantStack() {};
|
|
MutantStack(const MutantStack &mut) { *this = mut; }
|
|
~MutantStack() {};
|
|
MutantStack &operator=(const MutantStack &mut) {
|
|
std::stack<T, Container>::operator=(mut);
|
|
return *this;
|
|
}
|
|
|
|
typedef typename Container::iterator iterator;
|
|
|
|
iterator begin() { return this->c.begin(); }
|
|
iterator end() { return this->c.end(); }
|
|
};
|