Fix deprecation warning in ~ScopedMessage

This commit is contained in:
Martin Hořeňovský 2018-02-25 21:29:01 +01:00
parent 3fe4d394a5
commit 7d0cfd27ce
1 changed files with 7 additions and 0 deletions

View File

@ -37,11 +37,18 @@ namespace Catch {
: m_info( other.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