Is there a way to write the implementations of template functions (or methods of a template class) in .cpp?

It's making my header very ugly.

If I just move them to .cpp, I get linker errors, as expected.

Thanks