Undo workaround for GCC template incompatibility

It turns out that there were only two things that needed to be done to achieve GCC compatibility here:
1. Use the "template" keyword
2. Avoid having like angle brackets touching (i.e. "<<" or ">>") which enclose nested template parameters