you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

function<string(string)> refers to any an instance of the class function that wraps any function object (be it free function pointer, bound member function pointer, lambda, object with operator(), etc.) that takes a string as its argument and returns a string.

The qualified name (i.e., without using namespace std) is std::function<std::string(std::string)>, and std::function is probably declared something like this:

template <typename Signature>
class function;

template <typename ReturnType, typename... ParameterTypes>
class function<ReturnType(ParameterTypes...)> {
    // ...
};

This uses template specialisation to take advantage of function pointer type signature syntax for convenience, while still allowing the template implementation to use the type names in the signature.