mirror of
https://github.com/catchorg/Catch2.git
synced 2025-02-21 13:43:30 +01:00
"test" expression using !! instead of static_cast to bool.
This addresses #657 while (hopefully) maintaining fix for #574
This commit is contained in:
parent
b4f4cf370d
commit
07f04fc95d
@ -38,7 +38,7 @@
|
||||
__catchResult.useActiveException( Catch::ResultDisposition::Normal ); \
|
||||
} \
|
||||
INTERNAL_CATCH_REACT( __catchResult ) \
|
||||
} while( Catch::isTrue( false && static_cast<bool>(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 ) \
|
||||
|
Loading…
Reference in New Issue
Block a user