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

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-06-15 11:43:31 +0200
committerPhil Nash2017-06-26 16:50:23 +0100
commit7bcfdf8e9441ddf38667f2a10f671d122147f0fa (patch)
treefafd8cb11f0b0bdeb1bc653b32b4660e537693ae /include
parent8d5f6c8e2e5fdf355014f410c173ad5cd38e0bf8 (diff)
downloadcatch3-7bcfdf8e9441ddf38667f2a10f671d122147f0fa.tar.gz
Disable deprecation warning of std::uncaught_exception
We might prefer to use `std::uncaught_exceptions` in the future, but I would prefer not to bring in more configuration into Catch Classic Closes #927
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_section.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/internal/catch_section.hpp b/include/internal/catch_section.hpp
index a5d1b6d5..aab721f6 100644
--- a/include/internal/catch_section.hpp
+++ b/include/internal/catch_section.hpp
@@ -30,6 +30,10 @@ namespace Catch {
m_timer.start();
}
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
+#endif
Section::~Section() {
if( m_sectionIncluded ) {
SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
@@ -39,6 +43,9 @@ namespace Catch {
getResultCapture().sectionEnded( endInfo );
}
}
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
// This indicates whether the section should be executed or not
Section::operator bool() const {