mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
update at ES.72 rule
add code sample for (Prefer a `for`-statement to a `while`-statement when there is an obvious loop variable) rule
This commit is contained in:
parent
2e5b16736b
commit
f80fa9f5fa
|
@ -7192,7 +7192,15 @@ This will copy each elements of `vs` into `s`. Better
|
|||
|
||||
**Example**:
|
||||
|
||||
???
|
||||
for (int i = 0; i < vec.size(); i++) {
|
||||
// do work
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
while (i < vec.size()) {
|
||||
// do work
|
||||
i++;
|
||||
}
|
||||
|
||||
**Enforcement**: ???
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user