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

Skip to content

Commit 3667b08

Browse files
authored
Merge pull request isocpp#1095 from brenoguim/hotfix/public-deleted-methods
Add public access modifier to examples
2 parents fbc48fa + eb0707d commit 3667b08

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 */; }
@@ -17868,6 +17869,7 @@ If you intend for a class to match a concept, verifying that early saves users p
1786817869
##### Example
1786917870

1787017871
class X {
17872+
public:
1787117873
X() = delete;
1787217874
X(const X&) = default;
1787317875
X(X&&) = default;

0 commit comments

Comments
 (0)