Skip to content

Commit 3576eb9

Browse files
1 parent 03d2e07 commit 3576eb9

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

bin/External/catch.hpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8502,18 +8502,11 @@ namespace Catch {
85028502
: m_info( other.m_info )
85038503
{}
85048504

8505-
#if defined(_MSC_VER)
8506-
#pragma warning(push)
8507-
#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
8508-
#endif
85098505
ScopedMessage::~ScopedMessage() {
8510-
if ( !std::uncaught_exception() ){
8506+
if ( std::uncaught_exceptions() == 0 ){
85118507
getResultCapture().popScopedMessage(m_info);
85128508
}
85138509
}
8514-
#if defined(_MSC_VER)
8515-
#pragma warning(pop)
8516-
#endif
85178510

85188511
} // end namespace Catch
85198512

@@ -8826,22 +8819,15 @@ namespace Catch {
88268819
m_timer.start();
88278820
}
88288821

8829-
#if defined(_MSC_VER)
8830-
#pragma warning(push)
8831-
#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
8832-
#endif
88338822
Section::~Section() {
88348823
if( m_sectionIncluded ) {
88358824
SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
8836-
if( std::uncaught_exception() )
8825+
if( std::uncaught_exceptions() > 0 )
88378826
getResultCapture().sectionEndedEarly( endInfo );
88388827
else
88398828
getResultCapture().sectionEnded( endInfo );
88408829
}
88418830
}
8842-
#if defined(_MSC_VER)
8843-
#pragma warning(pop)
8844-
#endif
88458831

88468832
// This indicates whether the section should be executed or not
88478833
Section::operator bool() const {

0 commit comments

Comments
 (0)