Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb0707d

Browse files
committed
Add public access modifier to examples
1 parent e6ac978 commit eb0707d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5968,6 +5968,7 @@ To prevent slicing, because the normal copy operations will copy only the base p
59685968
##### Example
59695969

59705970
class B { // GOOD: base class suppresses copying
5971+
public:
59715972
B(const B&) = delete;
59725973
B& operator=(const B&) = delete;
59735974
virtual unique_ptr<B> clone() { return /* B object */; }
@@ -17865,6 +17866,7 @@ If you intend for a class to match a concept, verifying that early saves users p
1786517866
##### Example
1786617867

1786717868
class X {
17869+
public:
1786817870
X() = delete;
1786917871
X(const X&) = default;
1787017872
X(X&&) = default;

0 commit comments

Comments
 (0)