mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
Bring back useful comment
Inb7b346c3e5
this conditional was simplified to just `while( false)` rather than the current one. Then in3a33315ff8
, that change was reverted. I found it hard to understand this complicated conditional, but after some digging in history I found this comment which used to be here. It was removed inb7b346c3e5
, but not restored together with the revert in3a33315ff8
. Let's revive it.
This commit is contained in:
parent
2deafc33e9
commit
eb452e9b35
@ -57,7 +57,8 @@
|
|||||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
||||||
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
|
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
|
||||||
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
|
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
|
||||||
} while( (void)0, (false) && static_cast<const bool&>( !!(__VA_ARGS__) ) )
|
} while( (void)0, (false) && static_cast<const bool&>( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look
|
||||||
|
// The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&.
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \
|
#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \
|
||||||
|
Loading…
Reference in New Issue
Block a user