Implementation of a templatized queue backed by a linked-list in C++