diff --git a/Telegram/SourceFiles/rpl/event_stream.h b/Telegram/SourceFiles/rpl/event_stream.h index b353218b9..e0f1aeb9f 100644 --- a/Telegram/SourceFiles/rpl/event_stream.h +++ b/Telegram/SourceFiles/rpl/event_stream.h @@ -34,7 +34,11 @@ public: void fire_copy(const Value &value) const { return fire_forward(value); } +#if defined _MSC_VER && _MSC_VER >= 1914 + producer events() const { +#else // _MSC_VER >= 1914 auto events() const { +#endif // _MSC_VER >= 1914 return make_producer([weak = make_weak()]( const auto &consumer) { if (auto strong = weak.lock()) { diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index 542a08d07..ff0690ce3 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -24,13 +24,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreturn-stack-address" -#endif // __clang__ +#elif defined _MSC_VER && _MSC_VER >= 1914 // __clang__ +#pragma warning(push) +#pragma warning(disable:4180) +#endif // __clang__ || _MSC_VER >= 1914 #include #ifdef __clang__ #pragma clang diagnostic pop -#endif // __clang__ +#elif defined _MSC_VER && _MSC_VER >= 1914 // __clang__ +#pragma warning(pop) +#endif // __clang__ || _MSC_VER >= 1914 #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #define OS_MAC_OLD