d08 ajouts de tests et reparation ex02

This commit is contained in:
Hugo LAMY
2022-03-19 21:39:58 +01:00
parent b3df6acd20
commit 58a7fccc49
7 changed files with 113 additions and 23 deletions

View File

@@ -7,22 +7,24 @@ template <typename T>
class MutantStack : public std::stack<T> {
public:
/*
typedef T * iterator;
typedef T const * const_iterator;
iterator begin() {return (&this->top() - (this->size() - 1));}
iterator end() {return (&this->top()+ 1);}
iterator end() {return (&this->top() + 1);}
const_iterator begin() const {return (&this->top() - (this->size() - 1));}
const_iterator end() const {return (&this->top()+ 1);}
const_iterator end() const {return (&this->top() + 1);}
*/
// typedef typename std::stack<T>::container_type::iterator iterator;
// typedef typename std::stack<T>::container_type::const_iterator const_iterator;
// iterator begin() {return this->c.begin();}
// iterator end() {return this->c.end();}
// const_iterator begin() const {return this->c.begin();}
// const_iterator end() const {return this->c.end();}
typedef typename std::stack<T>::container_type::iterator iterator;
typedef typename std::stack<T>::container_type::const_iterator const_iterator;
iterator begin() {return this->c.begin();}
iterator end() {return this->c.end();}
const_iterator begin() const {return this->c.begin();}
const_iterator end() const {return this->c.end();}
};
#endif