From 07f04fc95d70bf44c19855da0d42423273e0d8b0 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Thu, 12 May 2016 19:17:55 +0100 Subject: [PATCH] "test" expression using !! instead of static_cast to bool. This addresses #657 while (hopefully) maintaining fix for #574 --- include/internal/catch_capture.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index 6df9e79e..49b06441 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -38,7 +38,7 @@ __catchResult.useActiveException( Catch::ResultDisposition::Normal ); \ } \ INTERNAL_CATCH_REACT( __catchResult ) \ - } while( Catch::isTrue( false && static_cast(expr) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look + } while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_IF( expr, resultDisposition, macroName ) \