So this is how the code looks:
auto generateHash = [](std::vector &files) -> std::shared_ptr { // Other code here }
This is lambda function, see e.g. http://en.cppreference.com/w/cpp/language/lambda.