mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Add additional static_assert for the REQUIRE(a == b && c == d) case
This commit is contained in:
parent
b3faceede2
commit
d54c2258e0
@ -63,6 +63,62 @@ namespace Catch {
|
||||
m_op( op ),
|
||||
m_rhs( rhs )
|
||||
{}
|
||||
|
||||
template<typename T>
|
||||
auto operator && ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto operator || ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto operator == ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto operator != ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto operator > ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto operator < ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto operator >= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
auto operator <= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
|
||||
static_assert(always_false<T>::value,
|
||||
"operator|| is not supported inside assertions, "
|
||||
"wrap the expression inside parentheses, or decompose it");
|
||||
}
|
||||
};
|
||||
|
||||
template<typename LhsT>
|
||||
|
Loading…
Reference in New Issue
Block a user