I am seeing a C4389: "'==': signed/unsigned mismatch" compiler warning when I execute the following code in Visual Studio using the x86 compiler using a warning level of 4.
#include <algorithm>
#include <vector>
void functionA()
{
std::vector<int> x(10);
for(size_t i = 0; i < x.size(); i++)
{
if (std::find(x.begin(), x.end(), i) != x.end())
continue;
}
}
Can someone explain to me why this happens and how I can resolve this?
Here is a link https://godbolt.org/z/81v3d5asP to the online compiler where you can observe this problem.