diff options
| author | Martin Hořeňovský | 2017-12-07 19:10:28 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-12-07 19:10:28 +0100 |
| commit | c4d1aa90337300a8c7646b3f28b0a6783eec5a8f (patch) | |
| tree | 31770130a09006c7e9ba09679434b5585c326961 | |
| parent | 495d2458e078cda2a61bc773cba24bdb4c7b1774 (diff) | |
| download | catch3-c4d1aa90337300a8c7646b3f28b0a6783eec5a8f.tar.gz | |
Fix std::uncaught_exception deprecation warning in ~ScopedMessage
Closes #1124
| -rw-r--r-- | include/internal/catch_message.cpp | 7 |
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 |