Thanks for the explanation. I was using the preprocessor and totally forgot about using inline functions for that purpose.

I'm using a template parameter for that simply because it would force the compiler to make two versions of the function for performance's sake. I know it's generally bad practice but this program is small and won't matter. In larger programs, I can see the readability problems.