CPP08/ex02/inc/MutantStack.tpp

64 lines
1.2 KiB
C++

#pragma once
#include "MutantStack.hpp"
template <typename T>
MutantStack<T>::MutantStack() : std::stack<T>()
{}
template <typename T>
MutantStack<T>::MutantStack(const MutantStack &other) : std::stack<T>(other)
{}
template <typename T>
MutantStack<T>::MutantStack(MutantStack &&other) noexcept : std::stack<T>(std::move(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<T>::operator=(MutantStack &&other) noexcept
{
if (this != &other)
{
std::stack<T>::operator=(std::move(other));
}
return std::move(*this);
}
template <typename T>
MutantStack<T>::~MutantStack() noexcept
{}
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();
}