1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-21 10:13:43 +03:00

0032990: Configuration - compilation errors since Emscripten 3.1.11 due to time_t redefined long->int

Add std::is_same filter to IsEqual(time_t, time_t) definition.
This commit is contained in:
kgv 2022-05-27 09:56:50 +03:00
parent 23c56fc66a
commit 48e4aad412

View File

@ -16,22 +16,17 @@
#include <Standard_TypeDef.hxx> #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 // IsEqual : Returns Standard_True if two time values are equal
// ------------------------------------------------------------------ // ------------------------------------------------------------------
inline Standard_Boolean IsEqual (const Standard_Time theOne, template<typename TheTimeType>
const Standard_Time theTwo) 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; return theOne == theTwo;
} }
#endif #endif
#endif