Doubt in the operator overloaded function

in any function the data type to be returned is mention in the first line for eg - if the function is int sum then an int has to be returned … so in the operator function we have the data type T& where T is template class. so this means that a data type of t& should be returned but instead we are returning *f i.e we are returning a value as f is a pointer and by doing *f we are dereferencing it, so i am confused that the return data type and data type mentioned in the first line of operator function dont match