Skip to content

Commit

Permalink
Update vendered catch.h file to remove C++20 deprecated uncaught_exce…
Browse files Browse the repository at this point in the history
…ption() funciton
  • Loading branch information
tylermorganwall committed Feb 21, 2025
1 parent 50a99ec commit e96caf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inst/include/testthat/vendor/catch.h
Original file line number Diff line number Diff line change
Expand Up @@ -8379,7 +8379,7 @@ namespace Catch {
{}

ScopedMessage::~ScopedMessage() {
if ( !std::uncaught_exception() ){
if ( std::uncaught_exceptions() == 0 ){
getResultCapture().popScopedMessage(m_info);
}
}
Expand Down Expand Up @@ -8702,7 +8702,7 @@ namespace Catch {
Section::~Section() {
if( m_sectionIncluded ) {
SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
if( std::uncaught_exception() )
if( std::uncaught_exceptions() > 0 )
getResultCapture().sectionEndedEarly( endInfo );
else
getResultCapture().sectionEnded( endInfo );
Expand Down

0 comments on commit e96caf1

Please sign in to comment.