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
This commit is contained in:
Martin Hořeňovský 2017-06-15 11:43:31 +02:00
parent efba988ccc
commit b90d0b7267
1 changed files with 7 additions and 0 deletions

View File

@ -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 {