Object Oriented Programming (OOP)
- OOP50-CPP. Do not invoke virtual functions from constructors or destructors
- OOP51-CPP. Do not slice derived objects
- OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
- OOP53-CPP. Write constructor member initializers in the canonical order
- OOP54-CPP. Gracefully handle self-copy assignment
- OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
- OOP56-CPP. Honor replacement handler requirements
- OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
- OOP58-CPP. Copy operations must not mutate the source object
Information for Editors
To have a new guideline automatically listed above be sure to label it oop and rule .
Risk Assessment Summary
| Rule | Severity | Likelihood | Detectable | Repairable | Priority | Level |
|---|---|---|---|---|---|---|
| OOP50-CPP | Low | Unlikely | Yes | No | P2 | L3 |
| OOP51-CPP | Low | Probable | No | No | P2 | L3 |
| OOP52-CPP | Low | Likely | No | No | P3 | L3 |
| OOP53-CPP | Medium | Unlikely | Yes | Yes | P6 | L2 |
| OOP54-CPP | Low | Probable | Yes | No | P4 | L3 |
| OOP55-CPP | High | Probable | No | No | P6 | L2 |
| OOP56-CPP | Low | Probable | No | No | P2 | L3 |
| OOP57-CPP | High | Probable | Yes | No | P12 | L1 |
| OOP58-CPP | Low | Likely | Yes | No | P6 | L2 |


