From 6a09425de176ac2b03df496d01f5c0925aae3339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 25 Apr 2017 11:28:40 +0200 Subject: [PATCH] Remove C++98 backcompat from evaluate --- include/internal/catch_evaluate.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/internal/catch_evaluate.hpp b/include/internal/catch_evaluate.hpp index 87fcc17f..e1d2505f 100644 --- a/include/internal/catch_evaluate.hpp +++ b/include/internal/catch_evaluate.hpp @@ -39,10 +39,8 @@ namespace Internal { template inline T& opCast(T const& t) { return const_cast(t); } -// nullptr_t support based on pull request #154 from Konstantin Baumann -#ifdef CATCH_CONFIG_CPP11_NULLPTR + // nullptr_t support based on pull request #154 from Konstantin Baumann inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; } -#endif // CATCH_CONFIG_CPP11_NULLPTR // So the compare overloads can be operator agnostic we convey the operator as a template @@ -161,7 +159,6 @@ namespace Internal { return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); } -#ifdef CATCH_CONFIG_CPP11_LONG_LONG // long long to unsigned X template bool compare( long long lhs, unsigned int rhs ) { return applyEvaluator( static_cast( lhs ), rhs ); @@ -197,9 +194,7 @@ namespace Internal { template bool compare( T* lhs, long long rhs ) { return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); } -#endif // CATCH_CONFIG_CPP11_LONG_LONG -#ifdef CATCH_CONFIG_CPP11_NULLPTR // pointer to nullptr_t (when comparing against nullptr) template bool compare( std::nullptr_t, T* rhs ) { return Evaluator::evaluate( nullptr, rhs ); @@ -207,7 +202,6 @@ namespace Internal { template bool compare( T* lhs, std::nullptr_t ) { return Evaluator::evaluate( lhs, nullptr ); } -#endif // CATCH_CONFIG_CPP11_NULLPTR } // end of namespace Internal } // end of namespace Catch