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