diff --git a/include/internal/catch_debugger.h b/include/internal/catch_debugger.h index 75419842..db3ff681 100644 --- a/include/internal/catch_debugger.h +++ b/include/internal/catch_debugger.h @@ -38,12 +38,9 @@ namespace Catch { #endif #ifdef CATCH_TRAP - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } + #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }() #else - namespace Catch { - inline void doNothing() {} - } - #define CATCH_BREAK_INTO_DEBUGGER() Catch::doNothing() + #define CATCH_BREAK_INTO_DEBUGGER() []{}() #endif #endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED