Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Do not introduce VTable when using the NonCopyable helper

Commit
7c48ea6016831f3e6afab0a902022dd59e417f82
Author
Martin Hořeňovský ·
Parents
ca4c6218d418

Files · Download .tar.gz

Changes

 include/internal/catch_common.cpp        | 5 +----
 include/internal/catch_common.h          | 4 +---
 include/internal/catch_session.h         | 4 ++--
 include/internal/catch_test_registry.cpp | 2 --
 include/internal/catch_test_registry.h   | 1 -
 5 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/include/internal/catch_common.cpp b/include/internal/catch_common.cpp
index 790acbe5..d35ac064 100644
--- a/include/internal/catch_common.cpp
+++ b/include/internal/catch_common.cpp
@@ -37,7 +37,4 @@ namespace Catch {
         return std::string();
     }
 
-    NonCopyable::NonCopyable() = default;
-    NonCopyable::~NonCopyable() = default;
-
-}
+} // end namespace Catch
diff --git a/include/internal/catch_common.h b/include/internal/catch_common.h
index b4ca1c12..afa3909b 100644
--- a/include/internal/catch_common.h
+++ b/include/internal/catch_common.h
@@ -38,10 +38,8 @@ namespace Catch {
         NonCopyable( NonCopyable && )                  = delete;
         NonCopyable& operator = ( NonCopyable const& ) = delete;
         NonCopyable& operator = ( NonCopyable && )     = delete;
-
     protected:
-        NonCopyable();
-        virtual ~NonCopyable();
+        NonCopyable() noexcept = default;
     };
 
     struct SourceLineInfo {
diff --git a/include/internal/catch_session.h b/include/internal/catch_session.h
index 4e83d520..a648bf4a 100644
--- a/include/internal/catch_session.h
+++ b/include/internal/catch_session.h
@@ -20,7 +20,7 @@ namespace Catch {
     public:
 
         Session();
-        ~Session() override;
+        ~Session();
 
         void showHelp() const;
         void libIdentify();
@@ -41,7 +41,7 @@ namespace Catch {
                 returnCode = run();
             return returnCode;
         }
-    
+
         int run();
 
         clara::Parser const& cli() const;
diff --git a/include/internal/catch_test_registry.cpp b/include/internal/catch_test_registry.cpp
index 248bee4c..382ede30 100644
--- a/include/internal/catch_test_registry.cpp
+++ b/include/internal/catch_test_registry.cpp
@@ -32,6 +32,4 @@ namespace Catch {
             getMutableRegistryHub().registerStartupException();
         }
     }
-
-    AutoReg::~AutoReg() = default;
 }
diff --git a/include/internal/catch_test_registry.h b/include/internal/catch_test_registry.h
index c9624fc7..0701e17f 100644
--- a/include/internal/catch_test_registry.h
+++ b/include/internal/catch_test_registry.h
@@ -44,7 +44,6 @@ struct NameAndTags {
 
 struct AutoReg : NonCopyable {
     AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept;
-    ~AutoReg();
 };
 
 } // end namespace Catch