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-12-07 19:10:28 +0100
committerMartin Hořeňovský2017-12-07 19:10:28 +0100
commitc4d1aa90337300a8c7646b3f28b0a6783eec5a8f (patch)
tree31770130a09006c7e9ba09679434b5585c326961 /include
parent495d2458e078cda2a61bc773cba24bdb4c7b1774 (diff)
downloadcatch3-c4d1aa90337300a8c7646b3f28b0a6783eec5a8f.tar.gz
Fix std::uncaught_exception deprecation warning in ~ScopedMessage
Closes #1124
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_message.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/internal/catch_message.cpp b/include/internal/catch_message.cpp
index a66c5271..513c1776 100644
--- a/include/internal/catch_message.cpp
+++ b/include/internal/catch_message.cpp
@@ -49,11 +49,18 @@ namespace Catch {
getResultCapture().pushScopedMessage( m_info );
}
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
+#endif
ScopedMessage::~ScopedMessage() {
if ( !std::uncaught_exception() ){
getResultCapture().popScopedMessage(m_info);
}
}
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
} // end namespace Catch