mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
F.21 add loop increment in bad example (#2141)
to mimic the previous examples and avoid an infinite loop.
This commit is contained in:
@@ -3301,7 +3301,7 @@ To compare, if we passed out all values as return values, we would something lik
|
|||||||
return {in, move(s)};
|
return {in, move(s)};
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto p = get_string(cin); p.first; ) {
|
for (auto p = get_string(cin); p.first; p.second = get_string(p.first).second) {
|
||||||
// do something with p.second
|
// do something with p.second
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user