Fix bounds.3 example

This commit is contained in:
rafzi
2016-04-23 22:36:45 +02:00
parent e8dea3807a
commit 109f00847a

View File

@@ -15316,10 +15316,10 @@ Pointers should not be used as arrays. `span` is a bounds-checked, safe alternat
void f() void f()
{ {
int a[5]; int a[5];
span av = a; span<int> av = a;
g(a.data(), a.length()); // OK, if you have no choice g(av.data(), av.length()); // OK, if you have no choice
g1(a); // OK - no decay here, instead use implicit span ctor g1(av); // OK - no decay here, instead use implicit span ctor
} }
##### Enforcement ##### Enforcement