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

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2019-10-30 18:51:14 +0100
committerMartin Hořeňovský2019-10-30 18:51:14 +0100
commit7c48ea6016831f3e6afab0a902022dd59e417f82 (patch)
treebb1462751912df1bad5c26015c2cb85c27d78c62 /include
parentca4c6218d418fe38571e67a1c60453bb2ab26fe7 (diff)
downloadcatch3-7c48ea6016831f3e6afab0a902022dd59e417f82.tar.gz
Do not introduce VTable when using the NonCopyable helper
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_common.cpp5
-rw-r--r--include/internal/catch_common.h4
-rw-r--r--include/internal/catch_session.h4
-rw-r--r--include/internal/catch_test_registry.cpp2
-rw-r--r--include/internal/catch_test_registry.h1
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