Comparator function name inside a funtion

why did the instructor use bool (&cmp),as in why use the ampercent(reference operator) while writing the comparator function as an argument?

this is syntax of passing a function as a argument

we cann’t copy the whole function so we have to pass it as reference