diff --git a/container/FIFO.h b/container/FIFO.h index 5a66a334c..701138520 100644 --- a/container/FIFO.h +++ b/container/FIFO.h @@ -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; };