Use template 'upper' function instead of doing it at runtime