diff --git a/include/internal/catch_evaluate.hpp b/include/internal/catch_evaluate.hpp index 686e0b30..85f12de7 100644 --- a/include/internal/catch_evaluate.hpp +++ b/include/internal/catch_evaluate.hpp @@ -125,6 +125,7 @@ namespace Internal { return applyEvaluator( static_cast( lhs ), rhs ); } + // pointer to long (when comparing against NULL) template bool compare( long lhs, const T* rhs ) { return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); @@ -145,6 +146,27 @@ namespace Internal { return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); } + // pointer to int (when comparing against NULL) + template + bool compare( int lhs, const T* rhs ) { + return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); + } + + template + bool compare( int lhs, T* rhs ) { + return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); + } + + template + bool compare( const T* lhs, int rhs ) { + return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); + } + + template + bool compare( T* lhs, int rhs ) { + return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); + } + } // end of namespace Internal } // end of namespace Catch