Этот цикл прекрасно работает, когда я компилирую без ключа -std = gnu ++ 11. Если я скомпилирую с -std = gnu ++ 11, я получу следующую ошибку:
no match for call to '(__gnu_cxx::__normal_iterator<const float*, std::vector<float> >) (const float&, const float&)' if (!bool(__binary_pred(*__first1, *__first2)))
Мой код:
for (auto it_A = std::begin(vector_A); it_A != std::end(vector_A); it_A += 4)
{
bool found_in_B = false;
for (auto it_B = std::begin(vector_B); !found_in_B && it_B != std::end(vector_B); it_B += 4)
{
found_in_B = std::equal(it_A, it_A + blockSize, it_B, it_B + blockSize);
}
}