In the test program, the size of v is 2. Since 2 is bigger than -1, I think the while loop should be entered and "!" should be printed infinetely. However, the while loop is getting skipped. Why is that? I tested the code in VS 2017 and Ideone.
#include <iostream>
#include <vector>
int main(){
std::vector<std::pair<int,float>> v = {{1,2.0},{2,2.0}};
std::cout << v.size();
while(v.size() > -1){
std::cout << "!";
}
}