Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/interfaces
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-05-11 20:15:58 +0200
committerMartin Hořeňovský2020-05-12 23:56:34 +0200
commit03ef6b9f9af9c78f83607a90980a2b90118d501d (patch)
tree3b854eb734bf5b5efcf946ee9bcbaf4f1d7740c1 /src/catch2/interfaces
parent579dcd1a7663684b21495b4f5a61936e884b22de (diff)
downloadcatch3-03ef6b9f9af9c78f83607a90980a2b90118d501d.tar.gz
Explicitly default smfs when relevant to avoid Wdeprecated-copy-dtor
Diffstat (limited to 'src/catch2/interfaces')
-rw-r--r--src/catch2/interfaces/catch_interfaces_generatortracker.hpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_generatortracker.hpp b/src/catch2/interfaces/catch_interfaces_generatortracker.hpp
index c1b1391f..fa08be0c 100644
--- a/src/catch2/interfaces/catch_interfaces_generatortracker.hpp
+++ b/src/catch2/interfaces/catch_interfaces_generatortracker.hpp
@@ -16,11 +16,17 @@ namespace Catch {
class GeneratorUntypedBase {
public:
GeneratorUntypedBase() = default;
- virtual ~GeneratorUntypedBase();
+ // Generation of copy ops is deprecated (and Clang will complain)
+ // if there is a user destructor defined
+ GeneratorUntypedBase(GeneratorUntypedBase const&) = default;
+ GeneratorUntypedBase& operator=(GeneratorUntypedBase const&) = default;
+
+ virtual ~GeneratorUntypedBase(); // = default;
+
// Attempts to move the generator to the next element
- //
- // Returns true iff the move succeeded (and a valid element
- // can be retrieved).
+ //
+ // Returns true iff the move succeeded (and a valid element
+ // can be retrieved).
virtual bool next() = 0;
};
using GeneratorBasePtr = std::unique_ptr<GeneratorUntypedBase>;
@@ -28,7 +34,7 @@ namespace Catch {
} // namespace Generators
struct IGeneratorTracker {
- virtual ~IGeneratorTracker();
+ virtual ~IGeneratorTracker(); // = default;
virtual auto hasGenerator() const -> bool = 0;
virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0;
virtual void setGenerator( Generators::GeneratorBasePtr&& generator ) = 0;