Is there a reason to not template this function and specialize in the .cc?