Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Remove C++98 backcompat from evaluate

Commit
6a09425de176ac2b03df496d01f5c0925aae3339
Author
Martin Hořeňovský ·
Parents
c6e5738d54f4

Files · Download .tar.gz

Changes

 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<typename T>
     inline T& opCast(T const& t) { return const_cast<T&>(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<T*, T*, Op>::evaluate( lhs, reinterpret_cast<T*>( rhs ) );
     }
 
-#ifdef CATCH_CONFIG_CPP11_LONG_LONG
     // long long to unsigned X
     template<Operator Op> bool compare( long long lhs, unsigned int rhs ) {
         return applyEvaluator<Op>( static_cast<unsigned long>( lhs ), rhs );
@@ -197,9 +194,7 @@ namespace Internal {
     template<Operator Op, typename T> bool compare( T* lhs, long long rhs ) {
         return Evaluator<T*, T*, Op>::evaluate( lhs, reinterpret_cast<T*>( rhs ) );
     }
-#endif // CATCH_CONFIG_CPP11_LONG_LONG
 
-#ifdef CATCH_CONFIG_CPP11_NULLPTR
     // pointer to nullptr_t (when comparing against nullptr)
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
         return Evaluator<T*, T*, Op>::evaluate( nullptr, rhs );
@@ -207,7 +202,6 @@ namespace Internal {
     template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) {
         return Evaluator<T*, T*, Op>::evaluate( lhs, nullptr );
     }
-#endif // CATCH_CONFIG_CPP11_NULLPTR
 
 } // end of namespace Internal
 } // end of namespace Catch