mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-18 19:05:40 +02:00
Hide std::exception_ptr and friends if exceptions disabled
Some compilers, e.g. the Green Hills C++ compiler, react badly to the appearance of std::exception_ptr, std::current_exception, std::rethrow_exception and std::uncaught_exception(s). To allow usage of Catch2 with these compilers when exceptions are disabled, hide the usage of std::exception_ptr etc. when compiling with CATCH_CONFIG_DISABLE_EXCEPTIONS.
This commit is contained in:

committed by
Martin Hořeňovský

parent
0f12995501
commit
0614a4acb3
@@ -9,6 +9,7 @@
|
||||
#include "catch_startup_exception_registry.h"
|
||||
#include "catch_compiler_capabilities.h"
|
||||
|
||||
#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
namespace Catch {
|
||||
void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept {
|
||||
CATCH_TRY {
|
||||
@@ -24,3 +25,4 @@ void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexce
|
||||
}
|
||||
|
||||
} // end namespace Catch
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user