I have a template class for a queue. I also would like be able to store objects contained in a std::unique_ptr.
Normal template specialization is not possible because the std::unique pointer can be instantiated with any type.
Queue code is like this:
bool TQueue<T>::Push(const T& item) { m_Mem[currTail] = item; } bool TQueue<T>::Pop( T& item ) { item = m_Mem[currHead]; } How to make this work for std::unique_ptr types as well, when I need to do m_Mem[curtail] = std::move(item)