From 7206b618a4901a4ba70632acf6c2316c8eca46fa Mon Sep 17 00:00:00 2001 From: Bjarne Stroustrup Date: Tue, 16 May 2017 15:56:16 -0400 Subject: [PATCH] C.86 example accesses private members #541 fixed --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 61ea726..8b8937c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -6109,7 +6109,7 @@ This is not just slow, but if a memory allocation occurs for the elements in `tm (Simple) When a class has a `swap` member function, it should be declared `noexcept`. -### C.85: Make `swap` `noexcept` +### : Make `swap` `noexcept` ##### Reason @@ -6129,7 +6129,7 @@ Asymmetric treatment of operands is surprising and a source of errors where conv ##### Example - class X { + struct X { string name; int number; };