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 index = std::distance(dict.begin(), std::find_if(dict.begin(), dict.end(), [&](const auto& pair) { return pair.first == movieName; }));
2
1auto it = std::find_if( sortList.begin(), sortList.end(),
2 [&User](const std::pair<std::string, int>& element){ return element.first == User.name;} );
3