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 SFINAE support for all unknown compilers

Commit
052dc18c768969cd2bd843ce35872a96d5fa8307
Author
Phil Nash ·
Parents
bd5910ef9f75

Files · Download .tar.gz

Changes

 include/internal/catch_compiler_capabilities.h |  8 ++++----
 projects/SelfTest/TrickyTests.cpp              | 14 ++++++++------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h
index f3e792d1..7d0d7a3d 100644
--- a/include/internal/catch_compiler_capabilities.h
+++ b/include/internal/catch_compiler_capabilities.h
@@ -15,7 +15,7 @@
 #ifdef __BORLANDC__
 
 #if (__BORLANDC__ > 0x582 )
-#define CATCH_SFINAE
+//#define CATCH_SFINAE // Not confirmed
 #endif
 
 #endif // __BORLANDC__
@@ -25,7 +25,7 @@
 #ifdef __EDG_VERSION__
 
 #if (__EDG_VERSION__ > 238 )
-#define CATCH_SFINAE
+//#define CATCH_SFINAE // Not confirmed
 #endif
 
 #endif // __EDG_VERSION__
@@ -35,7 +35,7 @@
 #ifdef __DMC__
 
 #if (__DMC__ > 0x840 )
-#define CATCH_SFINAE
+//#define CATCH_SFINAE // Not confirmed
 #endif
 
 #endif // __DMC__
@@ -64,7 +64,7 @@
 #ifdef _MSC_VER
 
 #if (_MSC_VER >= 1310 ) // (VC++ 7.0+)
-#define CATCH_SFINAE
+//#define CATCH_SFINAE // Not confirmed
 #endif
 
 #endif // _MSC_VER
diff --git a/projects/SelfTest/TrickyTests.cpp b/projects/SelfTest/TrickyTests.cpp
index a40cecd5..0dd7c614 100644
--- a/projects/SelfTest/TrickyTests.cpp
+++ b/projects/SelfTest/TrickyTests.cpp
@@ -342,9 +342,11 @@ struct Awkward
     operator int() const { return 7; }
 };
 
-TEST_CASE( "non streamable", "" )
-{
-    Awkward awkward;
-    std::string s = Catch::toString( awkward );
-    REQUIRE( s == "7" ); // This is ambiguous without SFINAE
-}
+// 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
+//}