mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Fix std::uncaught_exception deprecation warning in ~ScopedMessage
Closes #1124
This commit is contained in:
		| @@ -49,11 +49,18 @@ namespace Catch { | ||||
|         getResultCapture().pushScopedMessage( m_info ); | ||||
|     } | ||||
|  | ||||
| #if defined(_MSC_VER) | ||||
| #pragma warning(push) | ||||
| #pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17 | ||||
| #endif | ||||
|     ScopedMessage::~ScopedMessage() { | ||||
|         if ( !std::uncaught_exception() ){ | ||||
|             getResultCapture().popScopedMessage(m_info); | ||||
|         } | ||||
|     } | ||||
| #if defined(_MSC_VER) | ||||
| #pragma warning(pop) | ||||
| #endif | ||||
|  | ||||
|  | ||||
| } // end namespace Catch | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský