search_n
vector<int> vecInt;
back_insert_iterator<vector<int>> it = back_inserter(vecInt);
it = 0;
it = 1;
it = 1;
it = 2;
it = 4;
it = 3;
it = 2;
it = 1;
if (search_n(vecInt.begin(), vecInt.end(), 2, 2,[](int i, int j)->bool{printf("i = %d j = %d \n", i, j);return i > j;}) == vecInt.begin() + 4)
{
printf("Equal\n"); //执行到此
}
/*
输出:
i = 0 j = 2
i = 1 j = 2
i = 3 j = 2
i = 4 j = 2
i = 2 j = 2
Equal
*/
请教为什么输出是这些