mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Merge pull request #635 from grzebiel/master
use proper argument for creation of span from array
This commit is contained in:
@@ -15422,7 +15422,7 @@ Pointers should not be used as arrays. `span` is a bounds-checked, safe alternat
|
||||
span<int> av = a;
|
||||
|
||||
g(av.data(), av.length()); // OK, if you have no choice
|
||||
g1(av); // OK -- no decay here, instead use implicit span ctor
|
||||
g1(a); // OK -- no decay here, instead use implicit span ctor
|
||||
}
|
||||
|
||||
##### Enforcement
|
||||
|
||||
Reference in New Issue
Block a user