On WIN32, Visual Studio 2022. When I define a vector<int> containing one hundred 0s and sort it with the code below, an exception "invalid comparator" throws.
vector<int> v(100, 0);
sort(v.begin(), v.end(), [](const int& a, const int& b)
{
return a >= b;
});
However, if I use return a > b, it will execute well. Why is that?