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:
parent
efba988ccc
commit
b90d0b7267
@ -30,6 +30,10 @@ namespace Catch {
|
|||||||
m_timer.start();
|
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() {
|
Section::~Section() {
|
||||||
if( m_sectionIncluded ) {
|
if( m_sectionIncluded ) {
|
||||||
SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
|
SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
|
||||||
@ -39,6 +43,9 @@ namespace Catch {
|
|||||||
getResultCapture().sectionEnded( endInfo );
|
getResultCapture().sectionEnded( endInfo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
// This indicates whether the section should be executed or not
|
// This indicates whether the section should be executed or not
|
||||||
Section::operator bool() const {
|
Section::operator bool() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user