Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-03-19 13:32:45 +0100
committerMartin Hořeňovský2020-05-01 09:24:26 +0200
commit5198fd3c9a4cd943786020abbdfc15dc5789be6f (patch)
tree1cd75dc8f31df532055d0ef2b755c64273048f59 /src
parent08f8a81b2c7e34d1333ef8629a36930ead3cb30e (diff)
downloadcatch3-5198fd3c9a4cd943786020abbdfc15dc5789be6f.tar.gz
Fix compilation error when lambdas are used in assertions
This is a partial revert of b7b346c3e5603.
Diffstat (limited to 'src')
-rw-r--r--src/catch2/internal/catch_compiler_capabilities.hpp2
-rw-r--r--src/catch2/internal/catch_test_macro_impl.hpp2
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, ... ) \