assignment operator added

This commit is contained in:
Robin Müller 2020-09-10 15:03:28 +02:00
parent d43ef479b6
commit cefac2db0b
1 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,17 @@ public:
this->setContainer(fifoArray.data());
}
/**
* @brief Custom assignment operator
* @param other
*/
FIFO& operator=(const FIFO& other){
FIFOBase<T>::operator=(other);
this->fifoArray = other.fifoArray;
this->setContainer(fifoArray.data());
return *this;
}
private:
std::array<T, capacity> fifoArray;
};