“Overload” function template based on function object operator() signature in C++98
问题 I want to make a template function that takes a function and a vector and uses the function to map that vector to another vector that will be returned by the function template. If the function taken as an argument is a free function, it may have one of two signatures. // T is the parameter of the function template T sig1(const T x); T sig2(const T x, const std::vector<T>& v); It may also be a function object in which operator() would behave like the free functions. Use of the function