How does C++'s type checking work when passing overloaded or templated functions as parameter
Type checking occurs when the template is instantiated, so the compiler knows the types by then.

Overload resolution happens at call site. The sub-expressions are the arguments, when their types is known the resolution can occur, hence giving the type of the call expression (that is, the return type).

Neither templates nor overloaded functions are first-class citizen constructs than can be passed around, so I am not sure what you mean by "such a function".