File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
inst/include/testthat/vendor Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11# testthat (development version)
22
3+ * Fixed an issue preventing compilation from succeeding due to deprecation / removal of ` std::uncaught_exception() ` (@kevinushey , #2047 ).
4+
35# testthat 3.2.3
46
57* Fixed an issue where ` expect_no_error(1) ` was failing (#2037 ).
Original file line number Diff line number Diff line change 379379
380380namespace Catch {
381381
382+ inline bool HasUncaughtException ()
383+ {
384+ #if __cplusplus >= 202002L
385+ return std::uncaught_exceptions () > 0 ;
386+ #else
387+ return std::uncaught_exception ();
388+ #endif
389+ }
390+
382391 struct IConfig ;
383392
384393 struct CaseSensitive { enum Choice {
@@ -8379,7 +8388,7 @@ namespace Catch {
83798388 {}
83808389
83818390 ScopedMessage::~ScopedMessage () {
8382- if ( !std::uncaught_exception () ){
8391+ if ( !HasUncaughtException () ){
83838392 getResultCapture ().popScopedMessage (m_info);
83848393 }
83858394 }
@@ -8702,7 +8711,7 @@ namespace Catch {
87028711 Section::~Section () {
87038712 if ( m_sectionIncluded ) {
87048713 SectionEndInfo endInfo ( m_info, m_assertions, m_timer.getElapsedSeconds () );
8705- if ( std::uncaught_exception () )
8714+ if ( HasUncaughtException () )
87068715 getResultCapture ().sectionEndedEarly ( endInfo );
87078716 else
87088717 getResultCapture ().sectionEnded ( endInfo );
You can’t perform that action at this time.
0 commit comments