diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9b4ca723e..d5a6b67af7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()
project(Catch2
- VERSION 3.2.0 # CML version placeholder, don't delete
+ VERSION 3.2.1 # CML version placeholder, don't delete
LANGUAGES CXX
# HOMEPAGE_URL is not supported until CMake version 3.12, which
# we do not target yet.
diff --git a/docs/release-notes.md b/docs/release-notes.md
index f83721e37d..7659404b83 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -2,6 +2,7 @@
# Release notes
**Contents**
+[3.2.1](#321)
[3.2.0](#320)
[3.1.1](#311)
[3.1.0](#310)
@@ -53,6 +54,13 @@
+## 3.2.1
+
+### Improvements
+* Fix the reworked decomposer to work with older (pre 9) GCC versions (#2571)
+ * **This required more significant changes to properly support C++20, there might be bugs.**
+
+
## 3.2.0
### Improvements
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index f2437d19c5..b27c4ec8b4 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5,8 +5,8 @@
// SPDX-License-Identifier: BSL-1.0
-// Catch v3.2.0
-// Generated: 2022-11-16 19:30:16.114602
+// Catch v3.2.1
+// Generated: 2022-12-09 23:01:15.713081
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
@@ -2012,7 +2012,7 @@ namespace Catch {
}
Version const& libraryVersion() {
- static Version version( 3, 2, 0, "", 0 );
+ static Version version( 3, 2, 1, "", 0 );
return version;
}
diff --git a/extras/catch_amalgamated.hpp b/extras/catch_amalgamated.hpp
index b2e002fcac..e91734a451 100644
--- a/extras/catch_amalgamated.hpp
+++ b/extras/catch_amalgamated.hpp
@@ -5,8 +5,8 @@
// SPDX-License-Identifier: BSL-1.0
-// Catch v3.2.0
-// Generated: 2022-11-16 19:30:14.116909
+// Catch v3.2.1
+// Generated: 2022-12-09 23:01:14.526666
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
@@ -1759,10 +1759,9 @@ namespace Catch {
#include
namespace Catch {
- template
- struct always_false : std::false_type {};
+ template
+ struct true_given : std::true_type {};
- template struct true_given : std::true_type {};
struct is_callable_tester {
template
static true_given()(std::declval()...))> test(int);
@@ -5393,6 +5392,13 @@ namespace Catch {
# pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
+#if defined( __clang__ )
+# pragma clang diagnostic push
+ // Did you know that comparing floats with `0` directly
+ // is super-duper dangerous in unevaluated context?
+# pragma clang diagnostic ignored "-Wfloat-equal"
+#endif
+
#define CATCH_DEFINE_COMPARABLE_TRAIT( id, op ) \
template \
struct is_##id##_comparable : std::false_type {}; \
@@ -5421,6 +5427,9 @@ namespace Catch {
#if defined( __GNUC__ ) && !defined( __clang__ )
# pragma GCC diagnostic pop
+#endif
+#if defined( __clang__ )
+# pragma clang diagnostic pop
#endif
@@ -5429,6 +5438,45 @@ namespace Catch {
#endif // CATCH_COMPARE_TRAITS_HPP_INCLUDED
+
+#ifndef CATCH_LOGICAL_TRAITS_HPP_INCLUDED
+#define CATCH_LOGICAL_TRAITS_HPP_INCLUDED
+
+#include
+
+namespace Catch {
+namespace Detail {
+
+#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510
+
+ using std::conjunction;
+ using std::disjunction;
+ using std::negation;
+
+#else
+
+ template struct conjunction : std::true_type {};
+ template struct conjunction : B1 {};
+ template
+ struct conjunction
+ : std::conditional_t, B1> {};
+
+ template struct disjunction : std::false_type {};
+ template struct disjunction : B1 {};
+ template
+ struct disjunction
+ : std::conditional_t> {};
+
+ template
+ struct negation : std::integral_constant {};
+
+#endif
+
+} // namespace Detail
+} // namespace Catch
+
+#endif // CATCH_LOGICAL_TRAITS_HPP_INCLUDED
+
#include
#include
@@ -5451,6 +5499,9 @@ namespace Catch {
namespace Catch {
+ template
+ struct always_false : std::false_type {};
+
class ITransientExpression {
bool m_isBinaryExpression;
bool m_result;
@@ -5580,112 +5631,99 @@ namespace Catch {
explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {}
#define CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( id, op ) \
- template < \
- typename RhsT, \
- std::enable_if_t< \
- Detail::is_##id##_comparable::value && \
- !std::is_arithmetic>::value, \
- int> = 0> \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \
- ->BinaryExpr { \
+ ->std::enable_if_t< \
+ Detail::conjunction, \
+ Detail::negation>>>::value, \
+ BinaryExpr> { \
return { \
static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
} \
- template < \
- typename RhsT, \
- std::enable_if_t::value && \
- std::is_arithmetic::value, \
- int> = 0> \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \
- ->BinaryExpr { \
+ ->std::enable_if_t< \
+ Detail::conjunction, \
+ std::is_arithmetic>::value, \
+ BinaryExpr> { \
return { \
static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
} \
- template < \
- typename RhsT, \
- std::enable_if_t::value && \
- Detail::is_eq_0_comparable:: \
- value && /* We allow long because we want \
- `ptr op NULL to be accepted */ \
- ( std::is_same::value || \
- std::is_same::value ), \
- int> = 0> \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \
- ->BinaryExpr { \
- if ( rhs != 0 ) { \
- throw_test_failure_exception(); \
- } \
+ ->std::enable_if_t< \
+ Detail::conjunction< \
+ Detail::negation>, \
+ Detail::is_eq_0_comparable, \
+ /* We allow long because we want `ptr op NULL` to be accepted */ \
+ Detail::disjunction, \
+ std::is_same>>::value, \
+ BinaryExpr> { \
+ if ( rhs != 0 ) { throw_test_failure_exception(); } \
return { \
static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \
} \
- template < \
- typename RhsT, \
- std::enable_if_t::value && \
- Detail::is_eq_0_comparable:: \
- value && /* We allow long because we want \
- `ptr op NULL` to be accepted */ \
- ( std::is_same::value || \
- std::is_same::value ), \
- int> = 0> \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \
- ->BinaryExpr { \
- if ( lhs.m_lhs != 0 ) { \
- throw_test_failure_exception(); \
- } \
+ ->std::enable_if_t< \
+ Detail::conjunction< \
+ Detail::negation>, \
+ Detail::is_eq_0_comparable, \
+ /* We allow long because we want `ptr op NULL` to be accepted */ \
+ Detail::disjunction, \
+ std::is_same>>::value, \
+ BinaryExpr> { \
+ if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \
return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
}
+
CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( eq, == )
CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( ne, != )
#undef CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR
- #define CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( id, op ) \
- template < \
- typename RhsT, \
- std::enable_if_t< \
- Detail::is_##id##_comparable::value && \
- !std::is_arithmetic>::value, \
- int> = 0> \
+#define CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( id, op ) \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \
- ->BinaryExpr { \
+ ->std::enable_if_t< \
+ Detail::conjunction, \
+ Detail::negation>>>::value, \
+ BinaryExpr> { \
return { \
static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
} \
- template < \
- typename RhsT, \
- std::enable_if_t::value && \
- std::is_arithmetic::value, \
- int> = 0> \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \
- ->BinaryExpr { \
+ ->std::enable_if_t< \
+ Detail::conjunction, \
+ std::is_arithmetic>::value, \
+ BinaryExpr> { \
return { \
static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
} \
- template < \
- typename RhsT, \
- std::enable_if_t::value && \
- Detail::is_##id##_0_comparable::value && \
- std::is_same::value, \
- int> = 0> \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \
- ->BinaryExpr { \
- if ( rhs != 0 ) { \
- throw_test_failure_exception(); \
- } \
+ ->std::enable_if_t< \
+ Detail::conjunction< \
+ Detail::negation>, \
+ Detail::is_##id##_0_comparable, \
+ std::is_same>::value, \
+ BinaryExpr> { \
+ if ( rhs != 0 ) { throw_test_failure_exception(); } \
return { \
static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \
} \
- template < \
- typename RhsT, \
- std::enable_if_t::value && \
- Detail::is_##id##_0_comparable::value && \
- std::is_same::value, \
- int> = 0> \
+ template \
friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \
- ->BinaryExpr { \
- if ( lhs.m_lhs != 0 ) { \
- throw_test_failure_exception(); \
- } \
+ ->std::enable_if_t< \
+ Detail::conjunction< \
+ Detail::negation>, \
+ Detail::is_##id##_0_comparable, \
+ std::is_same>::value, \
+ BinaryExpr> { \
+ if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \
return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
}
@@ -5697,15 +5735,22 @@ namespace Catch {
#undef CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR
- #define CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(op) \
- template>::value, int> = 0> \
- friend auto operator op ( ExprLhs && lhs, RhsT && rhs ) -> BinaryExpr { \
- return { static_cast(lhs.m_lhs op rhs), lhs.m_lhs, #op##_sr, rhs }; \
- } \
- template::value, int> = 0> \
- friend auto operator op ( ExprLhs && lhs, RhsT rhs ) -> BinaryExpr { \
- return { static_cast(lhs.m_lhs op rhs), lhs.m_lhs, #op##_sr, rhs }; \
- }
+#define CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR( op ) \
+ template \
+ friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \
+ ->std::enable_if_t< \
+ !std::is_arithmetic>::value, \
+ BinaryExpr> { \
+ return { \
+ static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
+ } \
+ template \
+ friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \
+ ->std::enable_if_t::value, \
+ BinaryExpr> { \
+ return { \
+ static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \
+ }
CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(|)
CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(&)
@@ -7313,7 +7358,7 @@ namespace Catch {
#define CATCH_VERSION_MAJOR 3
#define CATCH_VERSION_MINOR 2
-#define CATCH_VERSION_PATCH 0
+#define CATCH_VERSION_PATCH 1
#endif // CATCH_VERSION_MACROS_HPP_INCLUDED
@@ -10479,20 +10524,6 @@ namespace Matchers {
return arr;
}
-#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510
-
- using std::conjunction;
-
-#else // __cpp_lib_logical_traits
-
- template
- struct conjunction : std::true_type {};
-
- template
- struct conjunction : std::integral_constant::value> {};
-
-#endif // __cpp_lib_logical_traits
-
template
using is_generic_matcher = std::is_base_of<
Catch::Matchers::MatcherGenericBase,
@@ -10500,7 +10531,7 @@ namespace Matchers {
>;
template
- using are_generic_matchers = conjunction...>;
+ using are_generic_matchers = Catch::Detail::conjunction...>;
template
using is_matcher = std::is_base_of<
diff --git a/meson.build b/meson.build
index 230e24bd63..0cab573e27 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@
project(
'catch2',
'cpp',
- version: '3.2.0', # CML version placeholder, don't delete
+ version: '3.2.1', # CML version placeholder, don't delete
license: 'BSL-1.0',
meson_version: '>=0.50.0',
)
diff --git a/src/catch2/catch_version.cpp b/src/catch2/catch_version.cpp
index 027f0f4122..b6b818a01b 100644
--- a/src/catch2/catch_version.cpp
+++ b/src/catch2/catch_version.cpp
@@ -36,7 +36,7 @@ namespace Catch {
}
Version const& libraryVersion() {
- static Version version( 3, 2, 0, "", 0 );
+ static Version version( 3, 2, 1, "", 0 );
return version;
}
diff --git a/src/catch2/catch_version_macros.hpp b/src/catch2/catch_version_macros.hpp
index 36185fc644..f61d999dc4 100644
--- a/src/catch2/catch_version_macros.hpp
+++ b/src/catch2/catch_version_macros.hpp
@@ -10,6 +10,6 @@
#define CATCH_VERSION_MAJOR 3
#define CATCH_VERSION_MINOR 2
-#define CATCH_VERSION_PATCH 0
+#define CATCH_VERSION_PATCH 1
#endif // CATCH_VERSION_MACROS_HPP_INCLUDED