mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +03:00
* Update for Issue 1763 * add copy case * Add 'DataRecord'
This commit is contained in:
@@ -10449,7 +10449,10 @@ Flag variable and constant declarations with multiple declarators (e.g., `int* p
|
|||||||
|
|
||||||
Consider:
|
Consider:
|
||||||
|
|
||||||
auto p = v.begin(); // vector<int>::iterator
|
auto p = v.begin(); // vector<DataRecord>::iterator
|
||||||
|
auto z1 = v[3]; // makes copy of DataRecord
|
||||||
|
auto& z2 = v[3]; // avoids copy
|
||||||
|
const auto& z3 = v[3]; // const and avoids copy
|
||||||
auto h = t.future();
|
auto h = t.future();
|
||||||
auto q = make_unique<int[]>(s);
|
auto q = make_unique<int[]>(s);
|
||||||
auto f = [](int x) { return x + 10; };
|
auto f = [](int x) { return x + 10; };
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ d2
|
|||||||
D2
|
D2
|
||||||
d2's
|
d2's
|
||||||
dag
|
dag
|
||||||
|
DataRecord
|
||||||
dcl
|
dcl
|
||||||
dd
|
dd
|
||||||
de
|
de
|
||||||
|
|||||||
Reference in New Issue
Block a user