In your specific case it's not needed because
hi
isn't a template. But in general, there's no way around it (other than switching to non-member functions).