From d6d7d749c389811581dd5429974f2c80d9e565a8 Mon Sep 17 00:00:00 2001 From: hsutter Date: Thu, 13 Dec 2018 11:35:36 -0800 Subject: [PATCH] Minor rewording --- CppCoreGuidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index a9771f1..822918f 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -12135,6 +12135,7 @@ In the rare cases where the slicing was deliberate the code can be surprising. Circle c2 {{1,1}, 43}; assign( c, c2); // oops, not the whole state is transferred assert( c == c2); // if we supply copying, we should also provide comparison, + // but this will likely return false The result will be meaningless because the center and radius will not be copied from `c` into `s`. The first defense against this is to [define the base class `Shape` not to allow this](#Rc-copy-virtual).