63 lines
1.9 KiB
C++
63 lines
1.9 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* MutantStack.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/04/21 11:32:08 by aortigos #+# #+# */
|
|
/* Updated: 2026/04/21 11:32:08 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
template<typename T>
|
|
MutantStack<T>::MutantStack() : std::stack<T>()
|
|
{
|
|
// std::cout << "Span default constructor called" << std::endl;
|
|
}
|
|
|
|
template<typename T>
|
|
MutantStack<T>::MutantStack(const MutantStack &other)
|
|
{
|
|
*this = other;
|
|
}
|
|
|
|
template<typename T>
|
|
MutantStack<T>& MutantStack<T>::operator=(const MutantStack &other)
|
|
{
|
|
if (this != &other)
|
|
{
|
|
std::stack<T>::operator=(other);
|
|
}
|
|
return (*this);
|
|
}
|
|
|
|
template<typename T>
|
|
MutantStack<T>::~MutantStack()
|
|
{
|
|
// std::cout << "MutantStack destructor called" << std::endl;
|
|
}
|
|
|
|
template<typename T>
|
|
typename MutantStack<T>::iterator MutantStack<T>::begin()
|
|
{
|
|
return (this->c.begin());
|
|
}
|
|
|
|
template<typename T>
|
|
typename MutantStack<T>::iterator MutantStack<T>::end()
|
|
{
|
|
return (this->c.end());
|
|
}
|
|
|
|
template<typename T>
|
|
typename MutantStack<T>::const_iterator MutantStack<T>::begin() const
|
|
{
|
|
return (this->c.begin());
|
|
}
|
|
|
|
template<typename T>
|
|
typename MutantStack<T>::const_iterator MutantStack<T>::end() const
|
|
{
|
|
return (this->c.end());
|
|
} |