Pull Request №694 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/utility-misc-empty-dtors
Merge: d10f3af574b60550f256856d5a9742600ce1128b←dea119ab102f68e70b46cf23cbadd6842c68bd31
Apply Rule of Zero across remaining utility/ empty destructors
----------------
Merge commit message:
Apply Rule of Zero across remaining utility/ empty destructors
Remove user-declared destructors and out-of-line `= default` definitions
where the implicit (or `= default`) destructor is correct, and clarify a
non-trivial destructor by deleting copy/move on its owner.
* Remove empty `~Foo() {}` / `~Foo() override {}` where the implicit
destructor is already correct (and virtual via base when needed):
- utility/Bound.hh, utility/excn/Exceptions.hh,
utility/io/ocstream.hh, utility/keys/AutoKey.hh,
utility/keys/UserKey.hh.
* Convert `~Foo() {}` to `~Foo() = default;` for polymorphic root
classes whose implicit destructor would otherwise be non-virtual:
- utility/Show.hh, utility/factory/WidgetFactory.hh,
utility/io/irstream.hh, utility/io/orstream.hh,
utility/keys/Key.hh, utility/options/Option.hh.
* Drop `= default` destructor pairs (.hh declaration + .cc definition)
for classes inheriting from utility::VirtualBase, which already
supplies a virtual destructor:
- utility/heap, utility/integer_mapping (subset_mapping),
utility/recent_history_queue, utility/io/GeneralFileManager
(GeneralFileContents{,Vector}), utility/tag/Tag.
* utility/io/mpistream.hh: explicitly `= delete` the copy ctor and
copy assignment of `basic_mpi_streambuf` because its destructor
calls `flush_final()` (closes the MPI channel); replace the empty
`~basic_mpi_ostream() override {}` with `= default`.