Skip to content

Commit 0329954

Browse files
authored
Merge pull request #2767 from corob-msft/cr-acro-analysis
Acrolinx fixes to C26432
2 parents 8fda7b7 + 39b52c6 commit 0329954

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/code-quality/c26432.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.assetid: f587b05a-5c69-4176-baa6-fcb79d228b24
1313
**C++ Core Guidelines**:
1414
[C.21: If you define or =delete any default operation, define or =delete them all](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all)
1515

16-
Special operations like constructors are assumed to alter behavior of types so that they rely more on language mechanisms to automatically enforce specific scenarios (the canonical example is resource management). If any of these operations is explicitly defined, defaulted or deleted (as an indication that user wants to avoid any special handling of a type) it would be inconsistent to leave the other operations from the same group unspecified (i.e. implicitly defined by compiler).
16+
Special operations like constructors are assumed to alter behavior of types so that they rely more on language mechanisms to automatically enforce specific scenarios. The canonical example is resource management. If you explicitly define, default, or delete any of these special operations, it signals you want to avoid any special handling of a type. It's inconsistent to leave the other operations unspecified, that is, implicitly defined as deleted by the compiler.
1717

1818
## Remarks
1919

@@ -22,7 +22,7 @@ Special operations like constructors are assumed to alter behavior of types so t
2222
- move constructors;
2323
- copy assignment operators;
2424
- move assignment operators;
25-
- destructors;
26-
- The rule doesn't check if operations are defined in the same way, i.e. it is okay to mix deleted and defaulted operations with explicitly defined, but they all must be specified somehow if any of them appears.
27-
- Access levels are not important and can also be mixed.
25+
- destructors.
26+
- The rule doesn't check if operations are defined in the same way. It's okay to mix deleted and defaulted operations with explicitly defined ones. However, you must specify all of them if you specify any of them.
27+
- Access levels aren't important and can also be mixed.
2828
- The warning flags the first non-static function definition of a type, once per type.

0 commit comments

Comments
 (0)