diff --git a/src/object/object.h b/src/object/object.h index a175e0813..8a313ff17 100644 --- a/src/object/object.h +++ b/src/object/object.h @@ -37,6 +37,13 @@ LINPHONE_BEGIN_NAMESPACE +#ifdef _WIN32 + // TODO: Avoid this error. Maybe with a custom enabled_shared_from_this. + // Disable C4251 triggered by std::enabled_shared_from_this. + #pragma warning(push) + #pragma warning(disable: 4251) +#endif // ifdef _WIN32 + /* * Main Object of Linphone. Can be shared but is not Clonable. * Supports properties and shared from this. @@ -62,6 +69,10 @@ private: L_DISABLE_COPY(Object); }; +#ifdef _WIN32 + #pragma warning(pop) +#endif // ifdef _WIN32 + LINPHONE_END_NAMESPACE #endif // ifndef _L_OBJECT_H_