mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Update for #1306
This commit is contained in:
parent
88a9ba0640
commit
fd9c725549
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user