Skip to content

Commit 11ee7e5

Browse files
author
Andrew Pardoe
committed
Merge branch 'patch-1' of https://github.com/rafzi/CppCoreGuidelines into rafzi-patch-1
2 parents d6143fb + 109f008 commit 11ee7e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CppCoreGuidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15415,10 +15415,10 @@ Pointers should not be used as arrays. `span` is a bounds-checked, safe alternat
1541515415
void f()
1541615416
{
1541715417
int a[5];
15418-
span av = a;
15418+
span<int> av = a;
1541915419

15420-
g(a.data(), a.length()); // OK, if you have no choice
15421-
g1(a); // OK -- no decay here, instead use implicit span ctor
15420+
g(av.data(), av.length()); // OK, if you have no choice
15421+
g1(av); // OK -- no decay here, instead use implicit span ctor
1542215422
}
1542315423

1542415424
##### Enforcement

0 commit comments

Comments
 (0)