So in writing a C++ template class, I have defined a method that returns an object of the templated type, as such:
template class Foo { public
Indeed that's the standard way to solve the problem. I don't believe there should be any side effects to worry about in this case.