Fix build for MSVC 15.7.

Fixes #4661. Fixes #4667.
This commit is contained in:
John Preston 2018-05-10 11:13:13 +03:00
parent 0f54315495
commit 710b9bf454
2 changed files with 11 additions and 2 deletions

View File

@ -34,7 +34,11 @@ public:
void fire_copy(const Value &value) const {
return fire_forward(value);
}
#if defined _MSC_VER && _MSC_VER >= 1914
producer<Value> events() const {
#else // _MSC_VER >= 1914
auto events() const {
#endif // _MSC_VER >= 1914
return make_producer<Value>([weak = make_weak()](
const auto &consumer) {
if (auto strong = weak.lock()) {

View File

@ -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 <QtCore/QtCore>
#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