From 6f27719b2b994d1304f78194dc7824e4ddeea5f5 Mon Sep 17 00:00:00 2001 From: bgloyer <36457894+bgloyer@users.noreply.github.com> Date: Mon, 18 Jul 2022 18:52:16 -0700 Subject: [PATCH] C.64 Minor fix to make example compile (#1939) --- CppCoreGuidelines.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 9b9d12e..183e249 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -6165,11 +6165,11 @@ After `y = std::move(x)` the value of `y` should be the value `x` had and `x` sh ##### Example - template class X { // OK: value semantics public: X(); X(X&& a) noexcept; // move X + X& operator=(X&& a) noexcept; // move-assign X void modify(); // change the value of X // ... ~X() { delete[] p; } @@ -6178,8 +6178,7 @@ After `y = std::move(x)` the value of `y` should be the value `x` had and `x` sh int sz; }; - - X::X(X&& a) + X::X(X&& a) noexcept :p{a.p}, sz{a.sz} // steal representation { a.p = nullptr; // set to "empty"