Removed special handling for pointer comparisons

These all seem to be handled by the general case now
This commit is contained in:
Phil Nash 2012-05-24 08:27:09 +01:00
parent 73e1bc20bc
commit be838671ab
2 changed files with 0 additions and 55 deletions

View File

@ -75,44 +75,6 @@ private:
ResultInfoBuilder& m_result;
T m_lhs;
};
template<typename LhsT>
class PtrExpression {
public:
PtrExpression ( ResultInfoBuilder& result, const LhsT* lhs )
: m_result( &result ),
m_lhs( lhs )
{}
template<typename RhsT>
ResultInfoBuilder& operator == ( const RhsT* rhs ) {
return m_result->captureExpression<Internal::IsEqualTo>( m_lhs, rhs );
}
// This catches NULL
ResultInfoBuilder& operator == ( LhsT* rhs ) {
return m_result->captureExpression<Internal::IsEqualTo>( m_lhs, rhs );
}
template<typename RhsT>
ResultInfoBuilder& operator != ( const RhsT* rhs ) {
return m_result->captureExpression<Internal::IsNotEqualTo>( m_lhs, rhs );
}
// This catches NULL
ResultInfoBuilder& operator != ( LhsT* rhs ) {
return m_result->captureExpression<Internal::IsNotEqualTo>( m_lhs, rhs );
}
operator ResultInfoBuilder& () {
return m_result->captureBoolExpression( m_lhs );
}
private:
ResultInfoBuilder* m_result;
const LhsT* m_lhs;
};
} // end namespace Catch

View File

@ -36,23 +36,6 @@ public:
return expr;
}
Expression<const char*> operator->* ( const char* const& operand ) {
Expression<const char*> expr( m_result, operand );
return expr;
}
template<typename T>
PtrExpression<T> operator->* ( const T* operand ) {
PtrExpression<T> expr( m_result, operand );
return expr;
}
template<typename T>
PtrExpression<T> operator->* ( T* operand ) {
PtrExpression<T> expr( m_result, operand );
return expr;
}
Expression<bool> operator->* ( bool value ) {
Expression<bool> expr( m_result, value );
return expr;