We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acb201d commit 442cc3bCopy full SHA for 442cc3b
2 files changed
src/catch2/internal/catch_compiler_capabilities.hpp
@@ -36,7 +36,10 @@
36
#endif
37
38
// Matchers are only constexpr-able in C++20
39
-#if defined( CATCH_CPP20_OR_GREATER )
+#if defined( CATCH_CPP20_OR_GREATER ) && \
40
+ defined( __cpp_constexpr_dynamic_alloc ) && \
41
+ __cpp_constexpr_dynamic_alloc >= 201907L
42
+# define CATCH_INTERNAL_CONSTEXPR_MATCHERS_ENABLED
43
# define CATCH_CPP20_CONSTEXPR constexpr
44
#else
45
# define CATCH_CPP20_CONSTEXPR
tests/SelfTest/UsageTests/MatchersConstexpr.tests.cpp
@@ -9,7 +9,7 @@
9
#include <catch2/catch_test_macros.hpp>
10
#include <catch2/matchers/catch_matchers_templated.hpp>
11
12
-#if defined(CATCH_CPP20_OR_GREATER)
+#if defined( CATCH_INTERNAL_CONSTEXPR_MATCHERS_ENABLED )
13
14
namespace {
15
struct MatchAllMatcher final : public Catch::Matchers::MatcherGenericBase {
0 commit comments