mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Returned to older version of IsStreamable
- this time based on code from Martin Moene https://gist.github.com/martinmoene/5418947#file-insertionopdetector-cpp
This commit is contained in:
		| @@ -342,11 +342,9 @@ struct Awkward | ||||
|     operator int() const { return 7; } | ||||
| }; | ||||
|  | ||||
| // This now works with GCC/ Clang usinh SFINAE | ||||
| // Uncomment when it works on all compilers that are tested | ||||
| //TEST_CASE( "non streamable", "" ) | ||||
| //{ | ||||
| //    Awkward awkward; | ||||
| //    std::string s = Catch::toString( awkward ); | ||||
| //    REQUIRE( s == "7" ); // This is ambiguous without SFINAE | ||||
| //} | ||||
| TEST_CASE( "non streamable - with conv. op", "" ) | ||||
| { | ||||
|     Awkward awkward; | ||||
|     std::string s = Catch::toString( awkward ); | ||||
|     REQUIRE( s == "7" ); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash