diff options
| author | Martin Hořeňovský | 2020-03-19 13:32:45 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-01 09:24:26 +0200 |
| commit | 5198fd3c9a4cd943786020abbdfc15dc5789be6f (patch) | |
| tree | 1cd75dc8f31df532055d0ef2b755c64273048f59 /src/catch2 | |
| parent | 08f8a81b2c7e34d1333ef8629a36930ead3cb30e (diff) | |
| download | catch3-5198fd3c9a4cd943786020abbdfc15dc5789be6f.tar.gz | |
Fix compilation error when lambdas are used in assertions
This is a partial revert of b7b346c3e5603.
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/internal/catch_compiler_capabilities.hpp | 2 | ||||
| -rw-r--r-- | src/catch2/internal/catch_test_macro_impl.hpp | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp index 2cc7fd3c..f7a4632d 100644 --- a/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/src/catch2/internal/catch_compiler_capabilities.hpp @@ -148,8 +148,6 @@ # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)sizeof(__VA_ARGS__) - # if _MSC_VER >= 1900 // Visual Studio 2015 or newer # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS # endif diff --git a/src/catch2/internal/catch_test_macro_impl.hpp b/src/catch2/internal/catch_test_macro_impl.hpp index 560a4d5b..ffb767ed 100644 --- a/src/catch2/internal/catch_test_macro_impl.hpp +++ b/src/catch2/internal/catch_test_macro_impl.hpp @@ -56,7 +56,7 @@ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) + } while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \ |