Tweaked PR 1249 post-merge to cover copy assignment too

This commit is contained in:
hsutter
2018-08-13 11:18:52 -07:00
parent 08f67de9fb
commit d1def3290c

View File

@@ -1,6 +1,6 @@
# <a name="main"></a>C++ Core Guidelines # <a name="main"></a>C++ Core Guidelines
April 16, 2018 August 13, 2018
Editors: Editors:
@@ -6505,7 +6505,7 @@ Designing rules for classes in a hierarchy summary:
* [C.127: A class with a virtual function should have a virtual or protected destructor](#Rh-dtor) * [C.127: A class with a virtual function should have a virtual or protected destructor](#Rh-dtor)
* [C.128: Virtual functions should specify exactly one of `virtual`, `override`, or `final`](#Rh-override) * [C.128: Virtual functions should specify exactly one of `virtual`, `override`, or `final`](#Rh-override)
* [C.129: When designing a class hierarchy, distinguish between implementation inheritance and interface inheritance](#Rh-kind) * [C.129: When designing a class hierarchy, distinguish between implementation inheritance and interface inheritance](#Rh-kind)
* [C.130: For making deep copies of polymorphic classes prefer a virtual `clone` function to copy constructor](#Rh-copy) * [C.130: For making deep copies of polymorphic classes prefer a virtual `clone` function instead of copy construction/assignment](#Rh-copy)
* [C.131: Avoid trivial getters and setters](#Rh-get) * [C.131: Avoid trivial getters and setters](#Rh-get)
* [C.132: Don't make a function `virtual` without reason](#Rh-virtual) * [C.132: Don't make a function `virtual` without reason](#Rh-virtual)
* [C.133: Avoid `protected` data](#Rh-protected) * [C.133: Avoid `protected` data](#Rh-protected)
@@ -7000,7 +7000,7 @@ at the cost of the functionality being available only to users of the hierarchy.
* ??? * ???
### <a name="Rh-copy"></a>C.130: For making deep copies of polymorphic classes prefer a virtual `clone` function to copy constructor ### <a name="Rh-copy"></a>C.130: For making deep copies of polymorphic classes prefer a virtual `clone` function instead of copy construction/assignment
##### Reason ##### Reason