mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Refactor StreamEndStop slightly
This commit is contained in:
		| @@ -33,8 +33,4 @@ namespace Catch { | ||||
|         return os; | ||||
|     } | ||||
|  | ||||
|     std::string StreamEndStop::operator+() const { | ||||
|         return std::string(); | ||||
|     } | ||||
|  | ||||
| } // end namespace Catch | ||||
|   | ||||
| @@ -9,6 +9,7 @@ | ||||
| #define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED | ||||
|  | ||||
| #include <catch2/internal/catch_compiler_capabilities.hpp> | ||||
| #include <catch2/internal/catch_stringref.hpp> | ||||
|  | ||||
| #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line | ||||
| #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) | ||||
| @@ -70,12 +71,15 @@ namespace Catch { | ||||
|     // as well as | ||||
|     //    >> stuff +StreamEndStop | ||||
|     struct StreamEndStop { | ||||
|         std::string operator+() const; | ||||
|         StringRef operator+() const { | ||||
|             return StringRef(); | ||||
|         } | ||||
|  | ||||
|         template<typename T> | ||||
|         friend T const& operator + ( T const& value, StreamEndStop ) { | ||||
|             return value; | ||||
|         } | ||||
|     }; | ||||
|     template<typename T> | ||||
|     T const& operator + ( T const& value, StreamEndStop ) { | ||||
|         return value; | ||||
|     } | ||||
| } | ||||
|  | ||||
| #define CATCH_INTERNAL_LINEINFO \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský