diff options
| author | Chris Thrasher | 2023-12-28 16:39:19 -0600 |
|---|---|---|
| committer | Chris Thrasher | 2023-12-30 18:56:54 -0700 |
| commit | a5245ac76b18beae4a5b6ed62bbf4ae0194b457c (patch) | |
| tree | 306b4c0ea51ca9661a391756d1243236e3b21fca /src/catch2/generators | |
| parent | b7b71ffd3a2a659412357964e91ee7db954e28df (diff) | |
| download | catch3-remove_redundant_destructors.tar.gz | |
Remove redundant destructorsremove_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.
Diffstat (limited to 'src/catch2/generators')
| -rw-r--r-- | src/catch2/generators/catch_generators.hpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/catch2/generators/catch_generators.hpp b/src/catch2/generators/catch_generators.hpp index 117f1901..0f35a996 100644 --- a/src/catch2/generators/catch_generators.hpp +++ b/src/catch2/generators/catch_generators.hpp @@ -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, |