Answer the question
In order to leave comments, you need to log in
How to pass template function to function parameters?
Hello. There are two template functions max and min, you need to test them) I don’t want to write extra code, I want one testFuncTemplate function that will take three arguments: T a, T b, T (*f)) (T& a, T& b).
But as far as I understand, the compiler cannot determine the type of the passed function, how can this be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question