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

Skip to content

Commit fbc48fa

Browse files
authored
Merge pull request isocpp#1096 from brenoguim/hotfix/recommend-public-deleted-methods
Recommend deleted methods to be public.
2 parents 6ac3ac9 + 771a75e commit fbc48fa

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
@@ -6089,6 +6089,8 @@ A `unique_ptr` can be moved, but not copied. To achieve that its copy operations
60896089
auto pi3 {make()}; // OK, move: the result of make() is an rvalue
60906090
}
60916091

6092+
Note that deleted methods should be public.
6093+
60926094
##### Enforcement
60936095

60946096
The elimination of a default operation is (should be) based on the desired semantics of the class. Consider such classes suspect, but maintain a "positive list" of classes where a human has asserted that the semantics is correct.

0 commit comments

Comments
 (0)