mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Update for #1306
This commit is contained in:
@@ -11308,7 +11308,7 @@ Use a `span`:
|
||||
|
||||
void f2(array<int, 10> arr, int pos) // A2: Add local span and use that
|
||||
{
|
||||
span<int> a = {arr, pos};
|
||||
span<int> a = {arr.data(), pos};
|
||||
a[pos / 2] = 1; // OK
|
||||
a[pos - 1] = 2; // OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user