mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-21 12:05:39 +02:00
Static assertion for && and || expressions
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison;
|
||||
|
||||
// Wraps the (stringised versions of) the lhs, operator and rhs of an expression - as well as
|
||||
// the result of evaluating it. This is used to build an AssertionResult object
|
||||
class ExpressionResultBuilder {
|
||||
@@ -43,6 +45,9 @@ public:
|
||||
|
||||
AssertionResult buildResult( AssertionInfo const& info ) const;
|
||||
|
||||
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( RhsT const& );
|
||||
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( RhsT const& );
|
||||
|
||||
private:
|
||||
AssertionResultData m_data;
|
||||
struct ExprComponents {
|
||||
|
Reference in New Issue
Block a user