1bool isEqual(const std::pair<std::string, int>& element)
2{
3 return element.first == User.name;
4}
5it = std::find_if( sortList.begin(), sortList.end(), isEqual );
6
1auto it = std::find_if( sortList.begin(), sortList.end(),
2 [&User](const std::pair<std::string, int>& element){ return element.first == User.name;} );
3