mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-18 05:04:41 +03:00
Correct example comment
This commit is contained in:
@@ -59,7 +59,7 @@ dangerous_process_ints(&*remainder, v.end() - remainder); // correct but convolu
|
|||||||
Instead, using `span` encapsulates the pointer and the length:
|
Instead, using `span` encapsulates the pointer and the length:
|
||||||
|
|
||||||
~~~cpp
|
~~~cpp
|
||||||
// BETTER: Read n contiguous ints starting at *p
|
// BETTER: Read s.size() contiguous ints starting at s[0]
|
||||||
void process_ints(span<const int> s);
|
void process_ints(span<const int> s);
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user