Fix ES.102 odd loop condition in example

This commit is contained in:
mbuchner
2018-04-20 09:42:33 +02:00
parent 1e4dba2c0b
commit 53c0bd2bd1

View File

@@ -12673,7 +12673,7 @@ This makes surprises (and bugs) inevitable.
for (int i = 0; i < 10; ++i) a[i] = i; for (int i = 0; i < 10; ++i) a[i] = i;
vector<int> v(10); vector<int> v(10);
// compares signed to unsigned; some compilers warn, but we should not // compares signed to unsigned; some compilers warn, but we should not
for (gsl::index i = 0; v.size() < 10; ++i) v[i] = i; for (gsl::index i = 0; i < v.size(); ++i) v[i] = i;
int a2[-2]; // error: negative size int a2[-2]; // error: negative size