Remove redundant destructors

Classes will automatically inherit the virtual-ness of their base
class destructors. If the base class already has a virtual
destructor and the derived class needs default destructor semantics
then the derived class can omit defining the destructor in favor of
the compiler automatically defining it.

This has an additional benefit of reenabling move semantics. The
presence of a user-specified destructor automatically disables move
operations.
This commit is contained in:
Chris Thrasher authored and Martin Hořeňovský committed 2024-01-14 23:33:51 +01:00
1 parent d79bfa05c7
commit 05786fa7ec
8 files changed
-32

No files matched your search

@@ -37,12 +37,6 @@ namespace Detail {
}
public:
~IGenerator() override = default;
IGenerator() = default;
IGenerator(IGenerator const&) = default;
IGenerator& operator=(IGenerator const&) = default;
// Returns the current element of the generator
//
// \Precondition The generator is either freshly constructed,