Quote Originally Posted by laserlight View Post
What is guaranteed is that std::vector<int>::size_type is an unsigned integer type but int is a signed integer type.
That's good to know.

Quote Originally Posted by laserlight View Post
Yes, except that the code example demonstrates casting from std::vector<int>::size_type back to std::vector<int>::size_type. Your intention would be to cast to int:
Code:
for (int i(0); i < static_cast<int>(intvec.size()); ++i)
{
    intvec[i] = i;
}
Whoops