mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Merge pull request #618 from tlanc007/CP.2_617
CP.2_617: Changed variable s to a tigher form of span.
This commit is contained in:
commit
fbe6aac021
@ -10893,7 +10893,7 @@ Local static variables are a common source of data races.
|
|||||||
{
|
{
|
||||||
array<double, max> buf;
|
array<double, max> buf;
|
||||||
int sz = read_vec(fs, buf, max); // read from fs into buf
|
int sz = read_vec(fs, buf, max); // read from fs into buf
|
||||||
gsl::span<double> s {buf, max};
|
gsl::span<double> s {buf};
|
||||||
// ...
|
// ...
|
||||||
auto h1 = async([&]{ sort(par, s); }); // spawn a task to sort
|
auto h1 = async([&]{ sort(par, s); }); // spawn a task to sort
|
||||||
// ...
|
// ...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user