]> OCCT Git - occt.git/commitdiff
0032990: Configuration - compilation errors since Emscripten 3.1.11 due to time_t...
authorkgv <kgv@opencascade.com>
Fri, 27 May 2022 06:56:50 +0000 (09:56 +0300)
committerkgv <kgv@opencascade.com>
Sun, 29 May 2022 09:11:24 +0000 (12:11 +0300)
Add std::is_same filter to IsEqual(time_t, time_t) definition.

src/Standard/Standard_Time.hxx

index 3a441197906f2e8fc58e41da659c9d848f366e4d..9b95212632d9cb6cf7cc9be01b588eb21ba62642 100755 (executable)
 
 #include <Standard_TypeDef.hxx>
 
-// ===============================================
-// Methods from Standard_Entity class which are redefined:  
-//    - IsEqual
-// ===============================================
-
-#ifndef __QNX__ // same as Standard_Size
-
 // ------------------------------------------------------------------
 // IsEqual : Returns Standard_True if two time values are equal
 // ------------------------------------------------------------------
-inline Standard_Boolean IsEqual (const Standard_Time theOne,
-                                 const Standard_Time theTwo)
+template<typename TheTimeType>
+typename opencascade::std::enable_if<opencascade::std::is_same<TheTimeType,      Standard_Time>::value
+                                 && !opencascade::std::is_same<Standard_Size,    Standard_Time>::value
+                                 && !opencascade::std::is_same<Standard_Integer, Standard_Time>::value,
+                                     Standard_Boolean>::type
+IsEqual (const TheTimeType theOne, const TheTimeType theTwo)
 {
   return theOne == theTwo;
 }
 
 #endif
-
-#endif