mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Merge branch 'master' of https://github.com/isocpp/CppCoreGuidelines
This commit is contained in:
@@ -2699,7 +2699,7 @@ A `span` represents a range of elements, but how do we manipulate elements of th
|
||||
for (int x : s) cout << x << '\n';
|
||||
|
||||
// C-style traversal (potentially checked)
|
||||
for (int i = 0; i < s.size(); ++i) cout << x << '\n';
|
||||
for (int i = 0; i < s.size(); ++i) cout << s[i] << '\n';
|
||||
|
||||
// random access (potentially checked)
|
||||
s[7] = 9;
|
||||
|
||||
Reference in New Issue
Block a user