wrapping template function and <unresolved overloaded function type
问题 I have problem with my wrapping function. template <typename Iter, typename SomeFunction> void wrap(Iter first, Iter last, SomeFunction someFunction) { someFunction(first, last); } I would like to use it like this: template <typename Iter> void fill5(Iter first, Iter last) { fill(first, last, 5); } int main() { vector<int> v(100, -1); wrap(v.begin(), v.end(), fill5); } But I get test.cpp: In function ‘int main()’: test.cpp:16:40: error: no matching function for call to ‘wrap(std::vector<int>: