c++ - Undefined reference to template class destructor -
this question has answer here: what undefined reference/unresolved external symbol error , how fix it? 27 answers i had problem template class queue had been implementing functions in implementation file, saw this answer , resolved implementation in header file: queue.hpp #ifndef queue_hpp #define queue_hpp #include "instruction.hpp" #include "microblazeinstruction.hpp" #include <memory> #include <list> template<typename t> class queue{ public: queue(unsigned int max): maxsize{max} {}; ~queue(); std::list<t> getqueue(){ return queue; }; void push(t obj){ if(queue.size() < maxsize){ queue.push_front(obj); } else{ queue.pop_back(); queue.push_front(obj); } }; private: queue(const queue&); queue& o...