From eb0707d7ae90f474fe962a0028223e8ad54f84fb Mon Sep 17 00:00:00 2001 From: Breno Rodrigues Guimaraes Date: Sat, 2 Dec 2017 16:27:43 -0800 Subject: [PATCH] Add public access modifier to examples --- CppCoreGuidelines.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 29a61f2..74292e3 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -5968,6 +5968,7 @@ To prevent slicing, because the normal copy operations will copy only the base p ##### Example class B { // GOOD: base class suppresses copying + public: B(const B&) = delete; B& operator=(const B&) = delete; virtual unique_ptr clone() { return /* B object */; } @@ -17865,6 +17866,7 @@ If you intend for a class to match a concept, verifying that early saves users p ##### Example class X { + public: X() = delete; X(const X&) = default; X(X&&) = default;