mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Merge branch 'master' of https://github.com/isocpp/CppCoreGuidelines
This commit is contained in:
commit
d6143fb6c7
|
@ -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';
|
for (int x : s) cout << x << '\n';
|
||||||
|
|
||||||
// C-style traversal (potentially checked)
|
// 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)
|
// random access (potentially checked)
|
||||||
s[7] = 9;
|
s[7] = 9;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user