You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CppCoreGuidelines.md
+3-5
Original file line number
Diff line number
Diff line change
@@ -21967,7 +21967,7 @@ In this rare case, you could make the destructor public and non-virtual but clea
21967
21967
21968
21968
In general, however, avoid concrete base classes (see Item 35). For example, `unary_function` is a bundle-of-typedefs that was never intended to be instantiated standalone. It really makes no sense to give it a public destructor; a better design would be to follow this Item's advice and give it a protected non-virtual destructor.
## <a name="Sd-consistent"></a>Define Copy, move, and destroy consistently
22067
22067
@@ -22148,7 +22148,7 @@ Prefer compiler-generated (including `=default`) special members; only these can
22148
22148
In rare cases, classes that have members of strange types (such as reference members) are an exception because they have peculiar copy semantics.
22149
22149
In a class holding a reference, you likely need to write the copy constructor and the assignment operator, but the default destructor already does the right thing. (Note that using a reference member is almost always wrong.)
@@ -22585,8 +22585,6 @@ Alternatively, we will decide that no change is needed and delete the entry.
22585
22585
\[Alexandrescu01]: A. Alexandrescu. Modern C++ Design (Addison-Wesley, 2001).
22586
22586
* <a name="Cplusplus03"></a>
22587
22587
\[C++03]: ISO/IEC 14882:2003(E), Programming Languages — C++ (updated ISO and ANSI C++ Standard including the contents of (C++98) plus errata corrections).
22588
-
* <a name="CplusplusCS"></a>
22589
-
\[C++CS]: ???
22590
22588
* <a name="Cargill92"></a>
22591
22589
\[Cargill92]: T. Cargill. C++ Programming Style (Addison-Wesley, 1992).
0 commit comments