defined functions of template class in the header file