diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 7d12c18..9f3e967 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -10449,7 +10449,10 @@ Flag variable and constant declarations with multiple declarators (e.g., `int* p Consider: - auto p = v.begin(); // vector::iterator + auto p = v.begin(); // vector::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 q = make_unique(s); auto f = [](int x) { return x + 10; }; diff --git a/scripts/hunspell/isocpp.dic b/scripts/hunspell/isocpp.dic index 9f9858e..68ab1d3 100644 --- a/scripts/hunspell/isocpp.dic +++ b/scripts/hunspell/isocpp.dic @@ -140,6 +140,7 @@ d2 D2 d2's dag +DataRecord dcl dd de