diff --git a/glueHeaders.py b/glueHeaders.py index 175ecc12..f33ddff5 100644 --- a/glueHeaders.py +++ b/glueHeaders.py @@ -36,8 +36,6 @@ print "// This file has been merged from multiple headers. Please don't edit it print print '#ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED' print '#define TWOBLUECUBES_CATCH_HPP_INCLUDED' - parseFile( rootPath, 'catch.hpp' ) - print '#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED' print diff --git a/include/internal/catch_approx.hpp b/include/internal/catch_approx.hpp index 5630e3a2..37d54f37 100644 --- a/include/internal/catch_approx.hpp +++ b/include/internal/catch_approx.hpp @@ -36,10 +36,9 @@ namespace Catch } /////////////////////////////////////////////////////////////////////////// - template friend bool operator == ( - const T& lhs, + double lhs, const Approx& rhs ) { @@ -48,21 +47,19 @@ namespace Catch } /////////////////////////////////////////////////////////////////////////// - template friend bool operator == ( const Approx& lhs, - const T& rhs + double rhs ) { return operator==( rhs, lhs ); } /////////////////////////////////////////////////////////////////////////// - template friend bool operator != ( - const T& lhs, + double lhs, const Approx& rhs ) { @@ -70,11 +67,10 @@ namespace Catch } /////////////////////////////////////////////////////////////////////////// - template friend bool operator != ( const Approx& lhs, - const T& rhs + double rhs ) { return !operator==( rhs, lhs ); diff --git a/single_include/catch.hpp b/single_include/catch.hpp index 66a15e47..09e5d0c8 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -25,7 +25,6 @@ Finish macros, listed here, later (just CHECK_NOFAIL now) */ #define TWOBLUECUBES_CATCH_HPP_INCLUDED - // #included from: internal/catch_hub.h /* @@ -2388,10 +2387,9 @@ namespace Catch } /////////////////////////////////////////////////////////////////////////// - template friend bool operator == ( - const T& lhs, + double lhs, const Approx& rhs ) { @@ -2400,21 +2398,19 @@ namespace Catch } /////////////////////////////////////////////////////////////////////////// - template friend bool operator == ( const Approx& lhs, - const T& rhs + double rhs ) { return operator==( rhs, lhs ); } /////////////////////////////////////////////////////////////////////////// - template friend bool operator != ( - const T& lhs, + double lhs, const Approx& rhs ) { @@ -2422,11 +2418,10 @@ namespace Catch } /////////////////////////////////////////////////////////////////////////// - template friend bool operator != ( const Approx& lhs, - const T& rhs + double rhs ) { return !operator==( rhs, lhs ); @@ -5925,6 +5920,9 @@ int main (int argc, char * const argv[]) #import #include +// NB. Any general catch headers included here must be included +// in catch.hpp first to make sure they are included by the single +// header for non obj-usage /////////////////////////////////////////////////////////////////////////////// // This protocol is really only here for (self) documenting purposes, since